- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for LookUpField (0.12 sec)
-
scan.go
func prepareValues(values []interface{}, db *DB, columnTypes []*sql.ColumnType, columns []string) { if db.Statement.Schema != nil { for idx, name := range columns { if field := db.Statement.Schema.LookUpField(name); field != nil { values[idx] = reflect.New(reflect.PtrTo(field.FieldType)).Interface() continue } values[idx] = new(interface{}) } } else if len(columnTypes) > 0 {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 24 09:42:59 UTC 2024 - 10.1K bytes - Viewed (0) -
schema/relationship.go
ForeignKey: relation.Polymorphic.PolymorphicType, }) primaryKeyField := schema.PrioritizedPrimaryField if len(relation.foreignKeys) > 0 { if primaryKeyField = schema.LookUpField(relation.foreignKeys[0]); primaryKeyField == nil || len(relation.foreignKeys) > 1 { schema.err = fmt.Errorf("invalid polymorphic foreign keys %+v for %v on field %s", relation.foreignKeys, schema, field.Name) }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 03:46:59 UTC 2024 - 22.7K bytes - Viewed (0) -
schema/schema.go
schema.FieldsByBindName[bindName] = field } field.setupValuerAndSetter() } prioritizedPrimaryField := schema.LookUpField("id") if prioritizedPrimaryField == nil { prioritizedPrimaryField = schema.LookUpField("ID") } if prioritizedPrimaryField != nil { if prioritizedPrimaryField.PrimaryKey { schema.PrioritizedPrimaryField = prioritizedPrimaryField
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Jun 20 12:19:31 UTC 2024 - 13.7K bytes - Viewed (0) -
finisher_api.go
switch column := eq.Column.(type) { case string: if field := db.Statement.Schema.LookUpField(column); field != nil { db.AddError(field.Set(db.Statement.Context, db.Statement.ReflectValue, eq.Value)) } case clause.Column: if field := db.Statement.Schema.LookUpField(column.Name); field != nil { db.AddError(field.Set(db.Statement.Context, db.Statement.ReflectValue, eq.Value)) }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Sep 14 12:58:29 UTC 2024 - 22.8K bytes - Viewed (0) -
statement.go
v[name] = value } else if v, ok := stmt.Dest.([]map[string]interface{}); ok { for _, m := range v { m[name] = value } } else if stmt.Schema != nil { if field := stmt.Schema.LookUpField(name); field != nil { destValue := reflect.ValueOf(stmt.Dest) for destValue.Kind() == reflect.Ptr { destValue = destValue.Elem() } if stmt.ReflectValue != destValue {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 24 09:42:59 UTC 2024 - 19.9K bytes - Viewed (0) -
callbacks/query.go
for idx, name := range db.Statement.Selects { if db.Statement.Schema == nil { clauseSelect.Columns[idx] = clause.Column{Name: name, Raw: true} } else if f := db.Statement.Schema.LookUpField(name); f != nil { clauseSelect.Columns[idx] = clause.Column{Name: f.DBName} } else { clauseSelect.Columns[idx] = clause.Column{Name: name, Raw: true} } }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Aug 22 11:03:42 UTC 2024 - 10.1K bytes - Viewed (1) -
gorm.go
isRelation := ok && relation.JoinTable != nil if !isRelation { return fmt.Errorf("failed to find relation: %s", field) } for _, ref := range relation.References { f := joinSchema.LookUpField(ref.ForeignKey.DBName) if f == nil { return fmt.Errorf("missing field %s for join table", ref.ForeignKey.DBName) } f.DataType = ref.ForeignKey.DataType f.GORMDataType = ref.ForeignKey.GORMDataType
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Oct 09 11:29:48 UTC 2024 - 12.1K bytes - Viewed (0)