- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 79 for len (0.23 sec)
-
schema/utils.go
func ParseTagSetting(str string, sep string) map[string]string { settings := map[string]string{} names := strings.Split(str, sep) for i := 0; i < len(names); i++ { j := i if len(names[j]) > 0 { for { if names[j][len(names[j])-1] == '\\' { i++ names[j] = names[j][0:len(names[j])-1] + sep + names[i] names[i] = "" } else { break } } } values := strings.Split(names[j], ":")
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/helper_test.go
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
t.Fatalf("Failed to query with pointer of value, got error %v", err) } else if rus := resInt5.([]User); len(rus) != 3 { t.Fatalf("Scan into struct should work, got %+v, len %v", resInt5, len(rus)) } } func TestScanRows(t *testing.T) { user1 := User{Name: "ScanRowsUser1", Age: 1} user2 := User{Name: "ScanRowsUser2", Age: 10}
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) -
schema/index.go
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) -
tests/associations_has_one_test.go
// Count AssertAssociationCount(t, users, "Account", 2, "") // Find var accounts []Account if DB.Model(&users).Association("Account").Find(&accounts); len(accounts) != 2 { t.Errorf("accounts count should be %v, but got %v", 3, len(accounts)) } // Append DB.Model(&users).Association("Account").Append( &Account{Number: "account-slice-append-1"}, &Account{Number: "account-slice-append-2"},
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) -
schema/index_test.go
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/scanner_valuer_test.go
ExampleStruct ExampleStruct ExampleStructPtr *ExampleStruct } 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:])
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) -
callbacks/callmethod.go
if called := fc(db.Statement.ReflectValue.Interface(), tx); !called { switch db.Statement.ReflectValue.Kind() { case reflect.Slice, reflect.Array: db.Statement.CurDestIndex = 0 for i := 0; i < db.Statement.ReflectValue.Len(); i++ { if value := reflect.Indirect(db.Statement.ReflectValue.Index(i)); value.CanAddr() { fc(value.Addr().Interface(), tx) } else { db.AddError(gorm.ErrInvalidValue) return }
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Sat Feb 18 01:20:29 GMT 2023 - 846 bytes - Viewed (0) -
clause/select.go
type Select struct { Distinct bool Columns []Column Expression Expression } func (s Select) Name() string { return "SELECT" } func (s Select) Build(builder Builder) { if len(s.Columns) > 0 { if s.Distinct { builder.WriteString("DISTINCT ") } for idx, column := range s.Columns { if idx > 0 { builder.WriteByte(',') } builder.WriteQuoted(column) }
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) -
callbacks/associations.go
relPrimaryValues := make([]interface{}, 0, len(rel.FieldSchema.PrimaryFields)) for _, pf := range rel.FieldSchema.PrimaryFields { if pfv, ok := pf.ValueOf(db.Statement.Context, rv); !ok { relPrimaryValues = append(relPrimaryValues, pfv) } } cacheKey := utils.ToStringKey(relPrimaryValues...) if len(relPrimaryValues) != len(rel.FieldSchema.PrimaryFields) || !identityMap[cacheKey] {
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)