- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for prepare (0.2 sec)
-
prepare_stmt.go
db.Mux.Unlock() // wait for other goroutines prepared <-stmt.prepared if stmt.prepareErr != nil { return Stmt{}, stmt.prepareErr } return *stmt, nil } // cache preparing stmt first cacheStmt := Stmt{Transaction: isTransaction, prepared: make(chan struct{})} db.Stmts[query] = &cacheStmt db.Mux.Unlock() // prepare completed defer close(cacheStmt.prepared)
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Thu Mar 28 08:47:39 GMT 2024 - 6.4K bytes - Viewed (0) -
tests/associations_has_one_test.go
} AssertAssociationCount(t, user2, "Account", 0, "after delete") // Prepare Data for Clear account = Account{Number: "account-has-one-append"} if err := DB.Model(&user2).Association("Account").Append(&account); err != nil { t.Fatalf("Error happened when append Account, got %v", err) } AssertAssociationCount(t, user2, "Account", 1, "after prepare data") // Clear
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Thu Jan 06 07:02:53 GMT 2022 - 6.8K bytes - Viewed (0) -
tests/transaction_test.go
// enable prepare statement tx3 := DB.Session(&gorm.Session{PrepareStmt: true}) if err := tx3.Transaction(func(tx4 *gorm.DB) error { // nested transaction return tx4.Transaction(func(tx5 *gorm.DB) error { return tx5.First(&User{}, "name = ?", "transaction-2").Error }) }); err != nil { t.Fatalf("prepare statement and nested transcation coexist" + err.Error()) } })
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Sat Jun 10 13:05:19 GMT 2023 - 10.9K bytes - Viewed (0) -
tests/associations_belongs_to_test.go
t.Fatalf("Error happened when append Manager, got %v", err) } AssertAssociationCount(t, user2, "Company", 1, "after prepare data") AssertAssociationCount(t, user2, "Manager", 1, "after prepare data") // Clear if err := DB.Model(&user2).Association("Company").Clear(); err != nil { t.Errorf("Error happened when clear Company, got %v", err) }
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Mon Oct 30 09:15:49 GMT 2023 - 9.3K bytes - Viewed (0) -
tests/associations_many2many_test.go
} AssertAssociationCount(t, user2, "Languages", 0, "after delete") // Prepare Data for Clear if err := DB.Model(&user2).Association("Languages").Append(&language); err != nil { t.Fatalf("Error happened when append Languages, got %v", err) } AssertAssociationCount(t, user2, "Languages", 1, "after prepare data") // Clear if err := DB.Model(&user2).Association("Languages").Clear(); err != nil {
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Sat Jun 10 13:05:19 GMT 2023 - 13.2K bytes - Viewed (0) -
README.md
* Hooks (Before/After Create/Save/Update/Delete/Find) * Eager loading with `Preload`, `Joins` * Transactions, Nested Transactions, Save Point, RollbackTo to Saved Point * Context, Prepared Statement Mode, DryRun Mode * Batch Insert, FindInBatches, Find To Map * SQL Builder, Upsert, Locking, Optimizer/Index/Comment Hints, NamedArg, Search/Update/Create with SQL Expr * Composite Primary Key * Auto Migrations
Plain Text - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Tue Nov 07 02:20:06 GMT 2023 - 1.8K bytes - Viewed (0) -
finisher_api.go
// close prepared statement, because SavePoint not support prepared statement. // e.g. mysql8.0 doc: https://dev.mysql.com/doc/refman/8.0/en/sql-prepared-statements.html var ( preparedStmtTx *PreparedStmtTX isPreparedStmtTx bool ) // close prepared statement, because SavePoint not support prepared statement.
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Fri Jan 12 08:42:21 GMT 2024 - 22.7K bytes - Viewed (0) -
tests/associations_has_many_test.go
} AssertAssociationCount(t, user2, "Pets", 0, "after delete") // Prepare Data for Clear if err := DB.Model(&user2).Association("Pets").Append(&pet); err != nil { t.Fatalf("Error happened when append Pets, got %v", err) } AssertAssociationCount(t, user2, "Pets", 1, "after prepare data") // Clear if err := DB.Model(&user2).Association("Pets").Clear(); err != nil {
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Fri Dec 15 08:36:08 GMT 2023 - 15.6K bytes - Viewed (0) -
tests/README.md
# Test Guide ```bash cd tests # prepare test databases docker-compose up # run all tests ./tests_all.sh
Plain Text - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Sun Feb 23 01:38:51 GMT 2020 - 110 bytes - Viewed (0) -
scan.go
package gorm import ( "database/sql" "database/sql/driver" "reflect" "time" "gorm.io/gorm/schema" "gorm.io/gorm/utils" ) // prepareValues prepare values slice func prepareValues(values []interface{}, db *DB, columnTypes []*sql.ColumnType, columns []string) { if db.Statement.Schema != nil { for idx, name := range columns { if field := db.Statement.Schema.LookUpField(name); field != nil {
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Fri Apr 26 09:53:11 GMT 2024 - 9.8K bytes - Viewed (0)