- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 25 for Cool (0.13 sec)
-
callbacks.go
db *DB Clauses []string fns []func(*DB) callbacks []*callback } type callback struct { name string before string after string remove bool replace bool match func(*DB) bool handler func(*DB) processor *processor } func (cs *callbacks) Create() *processor { return cs.processors["create"] } func (cs *callbacks) Query() *processor {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Mar 26 03:33:36 GMT 2024 - 8.6K bytes - Viewed (1) -
callbacks/helper_test.go
package callbacks import ( "reflect" "testing" "gorm.io/gorm" "gorm.io/gorm/clause" ) func TestLoadOrStoreVisitMap(t *testing.T) { var vm visitMap var loaded bool type testM struct { Name string } t1 := testM{Name: "t1"} t2 := testM{Name: "t2"} t3 := testM{Name: "t3"} vm = make(visitMap) if loaded = loadOrStoreVisitMap(&vm, reflect.ValueOf(&t1)); loaded {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Mar 05 02:22:57 GMT 2024 - 3.4K bytes - Viewed (0) -
tests/count_test.go
t.Fatalf(fmt.Sprintf("Count should work, but got err %v", err)) } expects := []User{{Name: "main"}, {Name: "other"}, {Name: "other"}} sort.SliceStable(users, func(i, j int) bool { return strings.Compare(users[i].Name, users[j].Name) < 0 }) AssertEqual(t, users, expects) var count7 int64
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Oct 30 09:15:49 GMT 2023 - 6.9K bytes - Viewed (0) -
tests/embedded_struct_test.go
"encoding/json" "errors" "reflect" "testing" "time" "gorm.io/gorm" . "gorm.io/gorm/utils/tests" ) func TestEmbeddedStruct(t *testing.T) { type ReadOnly struct { ReadOnly *bool } type BasePost struct { Id int64 Title string URL string ReadOnly } type Author struct { ID string Name string Email string } type HNPost struct {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Oct 26 03:58:13 GMT 2023 - 7.3K bytes - Viewed (0) -
schema/serializer.go
func RegisterSerializer(name string, serializer SerializerInterface) { serializerMap.Store(strings.ToLower(name), serializer) } // GetSerializer get serializer func GetSerializer(name string) (serializer SerializerInterface, ok bool) { v, ok := serializerMap.Load(strings.ToLower(name)) if ok { serializer, ok = v.(SerializerInterface) } return serializer, ok } func init() { RegisterSerializer("json", JSONSerializer{})
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Mar 18 08:28:46 GMT 2024 - 4.6K bytes - Viewed (0) -
clause/expression.go
} // Expr raw expression type Expr struct { SQL string Vars []interface{} WithoutParentheses bool } // Build build raw expression func (expr Expr) Build(builder Builder) { var ( afterParenthesis bool idx int ) for _, v := range []byte(expr.SQL) { if v == '?' && len(expr.Vars) > idx { if afterParenthesis || expr.WithoutParentheses {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Oct 10 06:45:48 GMT 2023 - 8.3K bytes - Viewed (0) -
utils/utils.go
} } return "" } func IsValidDBNameChar(c rune) bool { return !unicode.IsLetter(c) && !unicode.IsNumber(c) && c != '.' && c != '*' && c != '_' && c != '$' && c != '@' } // CheckTruth check string true or not func CheckTruth(vals ...string) bool { for _, val := range vals { if val != "" && !strings.EqualFold(val, "false") { return true } }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Apr 22 06:43:02 GMT 2024 - 3.8K bytes - Viewed (0) -
logger/sql.go
"strings" "time" "unicode" "gorm.io/gorm/utils" ) const ( tmFmtWithMS = "2006-01-02 15:04:05.999" tmFmtZero = "0000-00-00 00:00:00" nullStr = "NULL" ) func isPrintable(s string) bool { for _, r := range s { if !unicode.IsPrint(r) { return false } } return true } // A list of Go types that should be converted to SQL primitives
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Mar 21 08:00:02 GMT 2024 - 5K bytes - Viewed (0) -
schema/schema_helper_test.go
t.Run("CheckSchema/"+s.Name, func(t *testing.T) { tests.AssertObjEqual(t, s, v, "Name", "Table") for idx, field := range primaryFields { var found bool for _, f := range s.PrimaryFields { if f.Name == field { found = true } } if idx == 0 { if field != s.PrioritizedPrimaryField.Name {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Dec 15 08:31:23 GMT 2023 - 7.5K bytes - Viewed (0) -
schema/naming.go
} var _ Namer = (*NamingStrategy)(nil) // NamingStrategy tables, columns naming strategy type NamingStrategy struct { TablePrefix string SingularTable bool NameReplacer Replacer NoLowerCase bool IdentifierMaxLength int } // TableName convert string to table name func (ns NamingStrategy) TableName(str string) string { if ns.SingularTable {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Oct 30 09:15:49 GMT 2023 - 5.2K bytes - Viewed (0)