- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for Husted (0.3 sec)
-
scan.go
} } else { matchedFieldCount[column] = 1 } } else if names := utils.SplitNestedRelationName(column); len(names) > 1 { // has nested relation if rel, ok := sch.Relationships.Relations[names[0]]; ok { subNameCount := len(names) // nested relation fields relFields := make([]*schema.Field, 0, subNameCount-1) relFields = append(relFields, rel.Field)
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Apr 26 09:53:11 GMT 2024 - 9.8K bytes - Viewed (0) -
schema/relationship_test.go
VisitingAddress Address `gorm:"embedded;embeddedPrefix:visiting_address_"` AddressID int Address struct { ID int Address } NestedAddress *NestedAddress `gorm:"embedded;embeddedPrefix:nested_address_"` CountryMixin } s, err := schema.Parse(&Org{}, &sync.Map{}, schema.NamingStrategy{}) if err != nil { t.Errorf("Failed to parse schema, got error %v", err) }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Apr 15 03:20:20 GMT 2024 - 25.5K bytes - Viewed (0) -
utils/utils.go
return strconv.FormatUint(v, 10) } return "" } const nestedRelationSplit = "__" // NestedRelationName nested relationships like `Manager__Company` func NestedRelationName(prefix, name string) string { return prefix + nestedRelationSplit + name } // SplitNestedRelationName Split nested relationships to `[]string{"Manager","Company"}` func SplitNestedRelationName(name string) []string {
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) -
callbacks/query.go
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Jan 29 03:34:57 GMT 2024 - 9.9K bytes - Viewed (0) -
finisher_api.go
// they are rolled back. func (db *DB) Transaction(fc func(tx *DB) error, opts ...*sql.TxOptions) (err error) { panicked := true if committer, ok := db.Statement.ConnPool.(TxCommitter); ok && committer != nil { // nested transaction if !db.DisableNestedTransaction { err = db.SavePoint(fmt.Sprintf("sp%p", fc)).Error if err != nil { return } defer func() {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Jan 12 08:42:21 GMT 2024 - 22.7K bytes - Viewed (0) -
tests/migrate_test.go
AssertEqual(t, nil, err) AssertEqual(t, "text[]", ct.DatabaseTypeName()) ct, err = findColumnType(&ArrayTypeModel{}, "nested_text_array") AssertEqual(t, nil, err) AssertEqual(t, "text[]", ct.DatabaseTypeName()) ct, err = findColumnType(&ArrayTypeModel{}, "nested_int_array") AssertEqual(t, nil, err) AssertEqual(t, "integer[]", ct.DatabaseTypeName()) } type mockMigrator struct {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Mar 18 11:24:16 GMT 2024 - 56.2K bytes - Viewed (0) -
schema/index_test.go
// Composite Index: Flattened structure. Data0A string `gorm:"index:,composite:comp_id0"` Data0B string `gorm:"index:,composite:comp_id0"` // Composite Index: Nested structure. Data1A string `gorm:"index:,composite:comp_id1"` CompIdxLevel1C // Composite Index: Unique and priority. Data2A string `gorm:"index:,unique,composite:comp_id2,priority:2"` CompIdxLevel2C }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Sun Feb 04 07:49:19 GMT 2024 - 8K bytes - Viewed (0) -
tests/preload_test.go
} var find1 Value err := DB.Joins("Nested").Joins("Nested.Join").Preload("Nested.Preloads").First(&find1, value1.ID).Error if err != nil { t.Errorf("failed to find value, got err: %v", err) } AssertEqual(t, find1, value1) var find2 Value // Joins will automatically add Nested queries. err = DB.Joins("Nested.Join").Preload("Nested.Preloads").First(&find2, value2.ID).Error if err != nil {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Apr 25 12:21:03 GMT 2024 - 14.9K bytes - Viewed (0) -
callbacks/preload.go
package callbacks import ( "fmt" "reflect" "sort" "strings" "gorm.io/gorm" "gorm.io/gorm/clause" "gorm.io/gorm/schema" "gorm.io/gorm/utils" ) // parsePreloadMap extracts nested preloads. e.g. // // // schema has a "k0" relation and a "k7.k8" embedded relation // parsePreloadMap(schema, map[string][]interface{}{ // clause.Associations: {"arg1"}, // "k1": {"arg2"},
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Apr 25 12:21:03 GMT 2024 - 11.6K bytes - Viewed (0) -
statement.go
} // WriteByte write byte func (stmt *Statement) WriteByte(c byte) error { return stmt.SQL.WriteByte(c) } // WriteQuoted write quoted value func (stmt *Statement) WriteQuoted(value interface{}) { stmt.QuoteTo(&stmt.SQL, value) } // QuoteTo write quoted value to writer func (stmt *Statement) QuoteTo(writer clause.Writer, field interface{}) { write := func(raw bool, str string) { if raw {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Jan 12 08:42:21 GMT 2024 - 19.8K bytes - Viewed (0)