- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 26 for field1 (0.2 sec)
-
schema/constraint.go
} // ParseUniqueConstraints parse schema unique constraints func (schema *Schema) ParseUniqueConstraints() map[string]UniqueConstraint { uniques := make(map[string]UniqueConstraint) for _, field := range schema.Fields { if field.Unique { name := schema.namer.UniqueName(schema.Table, field.DBName) uniques[name] = UniqueConstraint{Name: name, Field: field} } } return uniques
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Mar 18 07:33:54 GMT 2024 - 1.9K bytes - Viewed (0) -
schema/serializer.go
Value(ctx context.Context, field *Field, dst reflect.Value, fieldValue interface{}) (interface{}, error) } // JSONSerializer json serializer type JSONSerializer struct{} // Scan implements serializer interface func (JSONSerializer) Scan(ctx context.Context, field *Field, dst reflect.Value, dbValue interface{}) (err error) { fieldValue := reflect.New(field.FieldType) if dbValue != nil { var bytes []byte
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Mar 18 08:28:46 GMT 2024 - 4.6K bytes - Viewed (0) -
schema/index_test.go
{Field: &schema.Field{Name: "FieldD"}}, }, }, "uniq_field_e1_e2": { Name: "uniq_field_e1_e2", Class: "UNIQUE", Fields: []schema.IndexOption{ {Field: &schema.Field{Name: "FieldE1"}}, {Field: &schema.Field{Name: "FieldE2"}}, }, }, "idx_index_tests_field_f1": { Name: "idx_index_tests_field_f1", Fields: []schema.IndexOption{{Field: &schema.Field{Name: "FieldF1"}}},
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/embedded_struct_test.go
stmt := gorm.Statement{DB: DB} if err := stmt.Parse(&EngadgetPost{}); err != nil { t.Fatalf("failed to parse embedded struct") } else if len(stmt.Schema.PrimaryFields) != 1 { t.Errorf("should have only one primary field with embedded struct, but got %v", len(stmt.Schema.PrimaryFields)) } for _, name := range []string{"user_id", "user_name", "user_email"} { if !DB.Migrator().HasColumn(&HNPost{}, name) {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Oct 26 03:58:13 GMT 2023 - 7.3K bytes - Viewed (0) -
schema/schema_helper_test.go
} } for _, name := range []string{f.DBName, f.Name} { if name != "" { if field := s.LookUpField(name); field == nil || (field.Name != name && field.DBName != name) { t.Errorf("schema %v failed to look up field with dbname %v", s, f.DBName) } } } if f.PrimaryKey { var found bool
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Dec 15 08:31:23 GMT 2023 - 7.5K bytes - Viewed (0) -
tests/customize_field_test.go
if cc2.Name != "bar" { t.Errorf("Failed to query CustomizeColumn") } } func TestCustomColumnAndIgnoredFieldClash(t *testing.T) { // Make sure an ignored field does not interfere with another field's custom // column name that matches the ignored field. type CustomColumnAndIgnoredFieldClash struct { Body string `gorm:"-"` RawBody string `gorm:"column:body"` }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Sep 11 09:33:31 GMT 2020 - 6.9K bytes - Viewed (0) -
soft_delete.go
}}) stmt.Clauses["soft_delete_enabled"] = clause.Clause{} } } func (DeletedAt) UpdateClauses(f *schema.Field) []clause.Interface { return []clause.Interface{SoftDeleteUpdateClause{Field: f, ZeroValue: parseZeroValueTag(f)}} } type SoftDeleteUpdateClause struct { ZeroValue sql.NullString Field *schema.Field }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Wed Feb 01 06:40:55 GMT 2023 - 4.5K bytes - Viewed (0) -
clause/expression.go
modelType := reflectValue.Type() for i := 0; i < modelType.NumField(); i++ { if fieldStruct := modelType.Field(i); ast.IsExported(fieldStruct.Name) { namedMap[fieldStruct.Name] = reflectValue.Field(i).Interface() if fieldStruct.Anonymous { appendFieldsToMap(reflectValue.Field(i)) } } } } } appendFieldsToMap(reflect.ValueOf(value)) } }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Oct 10 06:45:48 GMT 2023 - 8.3K bytes - Viewed (0) -
errors.go
// ErrModelValueRequired model value required ErrModelValueRequired = errors.New("model value required") // ErrModelAccessibleFieldsRequired model accessible fields required ErrModelAccessibleFieldsRequired = errors.New("model accessible fields required") // ErrSubQueryRequired sub query required ErrSubQueryRequired = errors.New("sub query required") // ErrInvalidData unsupported data
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Apr 26 02:53:17 GMT 2024 - 2.5K bytes - Viewed (0) -
schema/naming_test.go
"PFAndESI": "pf_and_esi", "AbcAndJkl": "abc_and_jkl", "EmployeeID": "employee_id", "SKU_ID": "sku_id", "FieldX": "field_x", "HTTPAndSMTP": "http_and_smtp", "HTTPServerHandlerForURLID": "http_server_handler_for_url_id", "UUID": "uuid", "HTTPURL": "http_url",
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue May 30 02:00:48 GMT 2023 - 7K bytes - Viewed (0)