- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for FieldsByName (0.08 sec)
-
schema/schema.go
} } } if field.PrimaryKey { schema.PrimaryFields = append(schema.PrimaryFields, field) } } } if of, ok := schema.FieldsByName[field.Name]; !ok || of.TagSettings["-"] == "-" { schema.FieldsByName[field.Name] = field } if of, ok := schema.FieldsByBindName[bindName]; !ok || of.TagSettings["-"] == "-" { schema.FieldsByBindName[bindName] = field }
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/schema_helper_test.go
f.TagSettings = schema.ParseTagSetting(f.Tag.Get("gorm"), ";") } else { f.TagSettings = map[string]string{} } } parsedField, ok := s.FieldsByDBName[f.DBName] 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 {
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/schema_test.go
} user, err := schema.Parse(&User{}, &sync.Map{}, schema.NamingStrategy{}) if err != nil { t.Fatalf("failed to parse user with map, got error %v", err) } if field := user.FieldsByName["Attrs"]; field.DataType != "Map(String,String)" { t.Errorf("failed to parse user field Attrs") } } func TestParseSchemaWithPointerFields(t *testing.T) {
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/relationship.go
} if value, ok := field.TagSettings["POLYMORPHICID"]; ok { typeId = strings.TrimSpace(value) } relation.Polymorphic.PolymorphicType = relation.FieldSchema.FieldsByName[typeName] relation.Polymorphic.PolymorphicID = relation.FieldSchema.FieldsByName[typeId] if value, ok := field.TagSettings["POLYMORPHICVALUE"]; ok { relation.Polymorphic.Value = strings.TrimSpace(value) }
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Mon Aug 18 11:44:52 UTC 2025 - 23.1K bytes - Viewed (1) -
statement.go
processColumn(column, true) } // omit columns for _, column := range stmt.Omits { processColumn(column, false) } if stmt.Schema != nil { for _, field := range stmt.Schema.FieldsByName { name := field.DBName if name == "" { name = field.Name } if requireCreate && !field.Creatable { results[name] = false } else if requireUpdate && !field.Updatable {
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Thu Sep 04 13:13:16 UTC 2025 - 20.8K bytes - Viewed (0)