- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for BindNames (0.47 sec)
-
schema/schema_test.go
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Thu Aug 28 02:57:17 UTC 2025 - 13.3K bytes - Viewed (0) -
schema/field_test.go
fields := []*schema.Field{ {Name: "ID", DBName: "id", BindNames: []string{"ID"}, DataType: schema.Uint, PrimaryKey: true, Size: 64, Creatable: true, Updatable: true, Readable: true, HasDefaultValue: true, AutoIncrement: true}, {Name: "Name", DBName: "", BindNames: []string{"Name"}, DataType: "", Tag: `gorm:"-"`, Creatable: false, Updatable: false, Readable: false},
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Sat Feb 19 09:02:53 UTC 2022 - 12.7K bytes - Viewed (0) -
schema/schema.go
// } // ID string // is selected by LookUpFieldByBindName([]string{"ID"}, "ID") // } func (schema *Schema) LookUpFieldByBindName(bindNames []string, name string) *Field { for i := len(bindNames) - 1; i >= 0; i-- { find := strings.Join(bindNames[:i], ".") + "." + name if field, ok := schema.FieldsByBindName[find]; ok { return field } } return nil } type Tabler interface {
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Tue Aug 19 06:35:49 UTC 2025 - 12.9K bytes - Viewed (0) -
schema/field.go
schema.err = err } for _, ef := range field.EmbeddedSchema.Fields { ef.Schema = schema ef.OwnerSchema = field.EmbeddedSchema ef.BindNames = append([]string{fieldStruct.Name}, ef.BindNames...) if _, ok := field.TagSettings["EMBEDDED"]; ok || !fieldStruct.Anonymous { ef.EmbeddedBindNames = append([]string{fieldStruct.Name}, ef.EmbeddedBindNames...) }
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Wed Aug 20 04:51:17 UTC 2025 - 32K bytes - Viewed (0) -
schema/schema_helper_test.go
if !ok { parsedField, ok = s.FieldsByName[f.Name] } if !ok { t.Errorf("schema %v failed to look up field with name %v", s, f.Name) } else { tests.AssertObjEqual(t, parsedField, f, "Name", "DBName", "BindNames", "DataType", "PrimaryKey", "AutoIncrement", "Creatable", "Updatable", "Readable", "HasDefaultValue", "DefaultValue", "NotNull", "Unique", "Comment", "Size", "Precision", "TagSettings") if f.DBName != "" {
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Thu Aug 28 02:57:17 UTC 2025 - 7.5K bytes - Viewed (0) -
schema/relationship.go
schema.Relationships.Mux.Lock() defer schema.Relationships.Mux.Unlock() // set non-embedded relation if rel := schema.Relationships.Relations[relation.Name]; rel != nil { if len(rel.Field.BindNames) > 1 { schema.Relationships.Relations[relation.Name] = relation } } else { schema.Relationships.Relations[relation.Name] = relation } // set embedded relation
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Mon Aug 18 11:44:52 UTC 2025 - 23.1K bytes - Viewed (1)