- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 57 for OK (0.14 sec)
-
prepare_stmt.go
if sqldb, ok := db.ConnPool.(*sql.DB); ok { return sqldb, nil } if dbConnector, ok := db.ConnPool.(GetDBConnector); ok && dbConnector != nil { return dbConnector.GetDBConn() } return nil, ErrInvalidDB } func (db *PreparedStmtDB) Close() { db.Mux.Lock() defer db.Mux.Unlock() for _, query := range db.PreparedSQL { if stmt, ok := db.Stmts[query]; ok {
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) -
clause/select.go
} builder.WriteQuoted(column) } } else { builder.WriteByte('*') } } func (s Select) MergeClause(clause *Clause) { if s.Expression != nil { if s.Distinct { if expr, ok := s.Expression.(Expr); ok { expr.SQL = "DISTINCT " + expr.SQL clause.Expression = expr return } } clause.Expression = s.Expression } else { clause.Expression = s } }
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Wed Jul 14 07:51:24 GMT 2021 - 1.1K bytes - Viewed (0) -
schema/utils.go
elem := reflectValue.Index(i) elemKey := elem.Interface() if elem.Kind() != reflect.Ptr && elem.CanAddr() { elemKey = elem.Addr().Interface() } if _, ok := loaded[elemKey]; ok { continue } loaded[elemKey] = true fieldValues := make([]interface{}, len(fields)) notZero = false for idx, field := range fields {
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Sat Aug 19 13:35:14 GMT 2023 - 5.5K bytes - Viewed (0) -
tests/scanner_valuer_test.go
} type EncryptedData []byte func (data *EncryptedData) Scan(value interface{}) error { if b, ok := value.([]byte); ok { if len(b) < 3 || b[0] != '*' || b[1] != '*' || b[2] != '*' { return errors.New("Too short") } *data = append((*data)[0:], b[3:]...) return nil } else if s, ok := value.(string); ok { *data = []byte(s[3:]) return nil } return errors.New("Bytes expected") }
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Wed Jun 07 07:02:07 GMT 2023 - 10.6K bytes - Viewed (0) -
schema/index_test.go
}, }, }, indices) } func CheckIndices(t *testing.T, expected, actual map[string]schema.Index) { for k, ei := range expected { t.Run(k, func(t *testing.T) { ai, ok := actual[k] if !ok { t.Errorf("expected index %q but actual missing", k) return } tests.AssertObjEqual(t, ai, ei, "Name", "Class", "Type", "Where", "Comment", "Option") if len(ei.Fields) != len(ai.Fields) {
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Sun Feb 04 07:49:19 GMT 2024 - 8K bytes - Viewed (0) -
tests/transaction_test.go
} if err := tx.First(&User{}, "name = ?", user1.Name).Error; err != nil { t.Fatalf("Should find saved record, but got %v", err) } if sqlTx, ok := tx.Statement.ConnPool.(gorm.TxCommitter); !ok || sqlTx == nil { t.Fatalf("Should return the underlying sql.Tx") } tx.Rollback() if err := DB.First(&User{}, "name = ?", "transaction").Error; err == nil {
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/callbacks_test.go
createCallback.Remove("c1") if ok, msg := assertCallbacks(createCallback, []string{"c3", "c4", "c2"}); !ok { t.Errorf("callbacks tests failed, got %v", msg) } createCallback.Remove("c4") if ok, msg := assertCallbacks(createCallback, []string{"c3", "c2"}); !ok { t.Errorf("callbacks tests failed, got %v", msg) } createCallback.Remove("c2")
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Tue Mar 26 03:33:36 GMT 2024 - 7.2K bytes - Viewed (0) -
callbacks/associations.go
db.AddError(ref.ForeignKey.Set(db.Statement.Context, obj, pv)) if dest, ok := db.Statement.Dest.(map[string]interface{}); ok { dest[ref.ForeignKey.DBName] = pv if _, ok := dest[rel.Name]; ok { dest[rel.Name] = elem.Interface() } } } } } switch db.Statement.ReflectValue.Kind() { case reflect.Slice, reflect.Array:
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Tue Apr 11 03:06:13 GMT 2023 - 14.3K bytes - Viewed (0) -
callbacks/query.go
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Mon Jan 29 03:34:57 GMT 2024 - 9.9K bytes - Viewed (0) -
soft_delete.go
} func (sd SoftDeleteQueryClause) ModifyStatement(stmt *Statement) { if _, ok := stmt.Clauses["soft_delete_enabled"]; !ok && !stmt.Statement.Unscoped { if c, ok := stmt.Clauses["WHERE"]; ok { if where, ok := c.Expression.(clause.Where); ok && len(where.Exprs) >= 1 { for _, expr := range where.Exprs { if orCond, ok := expr.(clause.OrConditions); ok && len(orCond.Exprs) == 1 {
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Wed Feb 01 06:40:55 GMT 2023 - 4.5K bytes - Viewed (0)