- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 49 for settings (0.18 sec)
-
schema/index.go
} if (k == "UNIQUEINDEX") || settings["UNIQUE"] != "" { settings["CLASS"] = "UNIQUE" } priority, err := strconv.Atoi(settings["PRIORITY"]) if err != nil { priority = 10 } indexes = append(indexes, Index{ Name: name, Class: settings["CLASS"], Type: settings["TYPE"], Where: settings["WHERE"], Comment: settings["COMMENT"],
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Sun Feb 04 07:49:19 GMT 2024 - 3.7K bytes - Viewed (0) -
schema/utils.go
break } } } values := strings.Split(names[j], ":") k := strings.TrimSpace(strings.ToUpper(values[0])) if len(values) >= 2 { settings[k] = strings.Join(values[1:], ":") } else if k != "" { settings[k] = k } } return settings } func toColumns(val string) (results []string) { if val != "" { for _, v := range strings.Split(val, ",") {
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) -
callbacks/create_test.go
Email: "email", Age: 19, }, } stmt := &gorm.Statement{ DB: &gorm.DB{ Config: &gorm.Config{ NowFunc: func() time.Time { return time.Time{} }, }, Statement: &gorm.Statement{ Settings: sync.Map{}, Schema: s, }, }, ReflectValue: reflect.ValueOf(dest), Dest: dest, } stmt.Schema = s values := ConvertToCreateValues(stmt) expected := clause.Values{
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Mon Mar 18 05:48:42 GMT 2024 - 1.4K bytes - Viewed (0) -
callbacks/associations.go
FullSaveAssociations: db.FullSaveAssociations, SkipHooks: db.Statement.SkipHooks, DisableNestedTransaction: true, }) db.Statement.Settings.Range(func(k, v interface{}) bool { tx.Statement.Settings.Store(k, v) return true }) if tx.Statement.FullSaveAssociations { tx = tx.Set("gorm:update_track_time", true) } if len(selects) > 0 {
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/preload.go
preloadMap[name] = map[string][]interface{}{} } if value != "" { preloadMap[name][value] = args } } for name, args := range preloads { preloadFields := strings.Split(name, ".") value := strings.TrimPrefix(strings.TrimPrefix(name, preloadFields[0]), ".") if preloadFields[0] == clause.Associations { for _, relation := range s.Relationships.Relations { if relation.Schema == s {
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Thu Apr 25 12:21:03 GMT 2024 - 11.6K bytes - Viewed (0) -
statement.go
} if len(args) == 0 || (len(args) > 0 && strings.Contains(s, "?")) { // looks like a where condition return []clause.Expression{clause.Expr{SQL: s, Vars: args}} } if len(args) > 0 && strings.Contains(s, "@") { // looks like a named query return []clause.Expression{clause.NamedExpr{SQL: s, Vars: args}} } if strings.Contains(strings.TrimSpace(s), " ") { // looks like a where condition
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Fri Jan 12 08:42:21 GMT 2024 - 19.8K bytes - Viewed (0) -
tests/update_test.go
sort.Slice(result.Languages, func(i, j int) bool { return strings.Compare(result.Languages[i].Code, result.Languages[j].Code) > 0 }) sort.Slice(result.Toys, func(i, j int) bool { return result.Toys[i].ID < result.Toys[j].ID }) sort.Slice(result2.Languages, func(i, j int) bool { return strings.Compare(result2.Languages[i].Code, result2.Languages[j].Code) > 0 })
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Mon Dec 04 03:50:58 GMT 2023 - 30.3K bytes - Viewed (0) -
tests/helper_test.go
} sort.Slice(user.Languages, func(i, j int) bool { return strings.Compare(user.Languages[i].Code, user.Languages[j].Code) > 0 }) sort.Slice(expect.Languages, func(i, j int) bool { return strings.Compare(expect.Languages[i].Code, expect.Languages[j].Code) > 0 }) for idx, language := range user.Languages {
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Tue Mar 19 03:50:28 GMT 2024 - 8K bytes - Viewed (0) -
tests/scan_test.go
package tests_test import ( "reflect" "sort" "strings" "testing" "gorm.io/gorm" . "gorm.io/gorm/utils/tests" ) type PersonAddressInfo struct { Person *Person `gorm:"embedded"` Address *Address `gorm:"embedded"` } func TestScan(t *testing.T) { user1 := User{Name: "ScanUser1", Age: 1} user2 := User{Name: "ScanUser2", Age: 10} user3 := User{Name: "ScanUser3", Age: 20}
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Sat May 28 14:18:07 GMT 2022 - 8.2K bytes - Viewed (0) -
tests/scanner_valuer_test.go
Birthday: sql.NullTime{Time: time.Now(), Valid: true}, Allergen: NullString{sql.NullString{String: "Allergen", Valid: true}}, Password: EncryptedData("pass1"), Bytes: []byte("byte"), Num: 18, Strings: StringsSlice{"a", "b", "c"}, Structs: StructsSlice{ {"name1", "value1"}, {"name2", "value2"}, }, Role: Role{Name: "admin"}, ExampleStruct: ExampleStruct{"name", "value1"},
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)