- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for fieldValues (0.08 sec)
-
callbacks/preload.go
return err } // convert join identity map to relation identity map fieldValues := make([]interface{}, len(joinForeignFields)) joinFieldValues := make([]interface{}, len(joinRelForeignFields)) for i := 0; i < joinResults.Len(); i++ { joinIndexValue := joinResults.Index(i) for idx, field := range joinForeignFields { fieldValues[idx], _ = field.ValueOf(tx.Statement.Context, joinIndexValue) }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:52:33 UTC 2024 - 11.6K bytes - Viewed (0) -
association.go
var fieldValue reflect.Value if clear { fieldValue = reflect.MakeSlice(oldFieldValue.Type(), 0, oldFieldValue.Cap()) } else { fieldValue = reflect.MakeSlice(oldFieldValue.Type(), oldFieldValue.Len(), oldFieldValue.Cap()) reflect.Copy(fieldValue, oldFieldValue) } appendToFieldValues := func(ev reflect.Value) {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:49:45 UTC 2024 - 21.5K bytes - Viewed (0) -
schema/field.go
} fieldValue = reflect.New(newFieldType) if rvType != reflect.Indirect(fieldValue).Type() { getRealFieldValue(fieldValue) } if fieldValue.IsValid() { return } } } } getRealFieldValue(fieldValue) } } if v, isSerializer := fieldValue.Interface().(SerializerInterface); isSerializer {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Apr 15 03:20:20 UTC 2024 - 32K bytes - Viewed (0) -
statement.go
changed := func(field *schema.Field) bool { fieldValue, _ := field.ValueOf(stmt.Context, modelValue) if v, ok := selectColumns[field.DBName]; (ok && v) || (!ok && !restricted) { if mv, mok := stmt.Dest.(map[string]interface{}); mok { if fv, ok := mv[field.Name]; ok { return !utils.AssertEqual(fv, fieldValue) } else if fv, ok := mv[field.DBName]; ok {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 24 09:42:59 UTC 2024 - 19.9K bytes - Viewed (0) -
migrator/migrator.go
return err } return fc(stmt) } // DataTypeOf return field's db data type func (m Migrator) DataTypeOf(field *schema.Field) string { fieldValue := reflect.New(field.IndirectFieldType) if dataTyper, ok := fieldValue.Interface().(GormDataTypeInterface); ok { if dataType := dataTyper.GormDBDataType(m.DB, field); dataType != "" { return dataType } } return m.Dialector.DataTypeOf(field)
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Fri Apr 26 07:15:49 UTC 2024 - 29K bytes - Viewed (0) -
schema/schema.go
return schema, schema.err } else { schema.FieldsByName[field.Name] = field schema.FieldsByBindName[field.BindName()] = field } } fieldValue := reflect.New(field.IndirectFieldType) fieldInterface := fieldValue.Interface() if fc, ok := fieldInterface.(CreateClausesInterface); ok { field.Schema.CreateClauses = append(field.Schema.CreateClauses, fc.CreateClauses(field)...) }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Jun 20 12:19:31 UTC 2024 - 13.7K bytes - Viewed (0) -
schema/relationship.go
type Reference struct { PrimaryKey *Field PrimaryValue string ForeignKey *Field OwnPrimaryKey bool } func (schema *Schema) parseRelation(field *Field) *Relationship { var ( err error fieldValue = reflect.New(field.IndirectFieldType).Interface() relation = &Relationship{ Name: field.Name, Field: field, Schema: schema, foreignKeys: toColumns(field.TagSettings["FOREIGNKEY"]),
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 03:46:59 UTC 2024 - 22.7K bytes - Viewed (0)