- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for Cannon (0.2 sec)
-
tests/prepared_stmt_test.go
} wg.Wait() conn, ok := tx.ConnPool.(*gorm.PreparedStmtDB) AssertEqual(t, ok, true) AssertEqual(t, len(conn.Stmts), 2) for _, stmt := range conn.Stmts { if stmt == nil { t.Fatalf("stmt cannot bee nil") } } AssertEqual(t, sqlDB.Stats().InUse, 0) } func TestPreparedStmtInTransaction(t *testing.T) { user := User{Name: "jinzhu"} if err := DB.Transaction(func(tx *gorm.DB) error {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Mar 21 07:55:43 GMT 2024 - 4K bytes - Viewed (0) -
schema/index.go
subName := field.Name const key = "COMPOSITE" if composite, found := settings[key]; found { if len(composite) == 0 || composite == key { err = fmt.Errorf( "The composite tag of %s.%s cannot be empty", field.Schema.Name, field.Name) return } subName = composite } name = field.Schema.namer.IndexName( field.Schema.Table, subName) }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Sun Feb 04 07:49:19 GMT 2024 - 3.7K bytes - Viewed (0) -
prepare_stmt.go
cacheStmt := Stmt{Transaction: isTransaction, prepared: make(chan struct{})} db.Stmts[query] = &cacheStmt db.Mux.Unlock() // prepare completed defer close(cacheStmt.prepared) // Reason why cannot lock conn.PrepareContext // suppose the maxopen is 1, g1 is creating record and g2 is querying record. // 1. g1 begin tx, g1 is requeue because of waiting for the system call, now `db.ConnPool` db.numOpen == 1.
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Mar 28 08:47:39 GMT 2024 - 6.4K bytes - Viewed (0) -
tests/scanner_valuer_test.go
func (i *Num) Scan(src interface{}) error { switch s := src.(type) { case []byte: n, _ := strconv.Atoi(string(s)) *i = Num(n) case int64: *i = Num(s) default: return errors.New("Cannot scan NamedInt from " + reflect.ValueOf(src).String()) } return nil } type StringsSlice []string func (l StringsSlice) Value() (driver.Value, error) { bytes, err := json.Marshal(l)
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Wed Jun 07 07:02:07 GMT 2023 - 10.6K bytes - Viewed (0)