- Sort Score
- Result 10 results
- Languages All
Results 11 - 16 of 16 for JoinTable (0.87 sec)
-
clause/joins.go
jt.Table = name return jt } // Join clause for from type Join struct { Type JoinType Table Table ON Where Using []string Expression Expression } func JoinTable(names ...string) Table { return Table{ Name: utils.JoinNestedRelationNames(names), } } func (join Join) Build(builder Builder) { if join.Expression != nil { join.Expression.Build(builder) } else {
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Sun May 25 07:40:40 UTC 2025 - 1.5K bytes - Viewed (0) -
callbacks/preload.go
relForeignFields []*schema.Field foreignFields []*schema.Field foreignValues [][]interface{} identityMap = map[string][]reflect.Value{} inlineConds []interface{} ) if rel.JoinTable != nil { var ( joinForeignFields = make([]*schema.Field, 0, len(rel.References)) joinRelForeignFields = make([]*schema.Field, 0, len(rel.References))
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Sun May 25 07:40:40 UTC 2025 - 11.7K bytes - Viewed (0) -
tests/create_test.go
} func TestCreateWithNoGORMPrimaryKey(t *testing.T) { type JoinTable struct { UserID uint FriendID uint } DB.Migrator().DropTable(&JoinTable{}) if err := DB.AutoMigrate(&JoinTable{}); err != nil { t.Errorf("no error should happen when auto migrate, but got %v", err) } jt := JoinTable{UserID: 1, FriendID: 2} err := DB.Create(&jt).Error if err != nil {
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Mon Jul 21 09:55:20 UTC 2025 - 26.8K bytes - Viewed (0) -
callbacks/associations.go
distinctElems := reflect.MakeSlice(reflect.SliceOf(fieldType), 0, 10) joins := reflect.MakeSlice(reflect.SliceOf(reflect.PointerTo(rel.JoinTable.ModelType)), 0, 10) objs := []reflect.Value{} appendToJoins := func(obj reflect.Value, elem reflect.Value) { joinValue := reflect.New(rel.JoinTable.ModelType) for _, ref := range rel.References { if ref.OwnPrimaryKey {
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Thu Feb 13 06:16:26 UTC 2025 - 14.4K bytes - Viewed (0) -
migrator/migrator.go
} getTable := func(rel *schema.Relationship) string { switch rel.Type { case schema.HasOne, schema.HasMany: return rel.FieldSchema.Table case schema.Many2Many: return rel.JoinTable.Table } return stmt.Table } for _, rel := range stmt.Schema.Relationships.Relations { if constraint := rel.ParseConstraint(); constraint != nil && constraint.Name == name {
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Fri Jun 06 02:35:01 UTC 2025 - 29.5K bytes - Viewed (0) -
schema/naming.go
"golang.org/x/text/language" ) // Namer namer interface type Namer interface { TableName(table string) string SchemaName(table string) string ColumnName(table, column string) string JoinTableName(joinTable string) string RelationshipFKName(Relationship) string CheckerName(table, column string) string IndexName(table, column string) string UniqueName(table, column string) string }
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Wed Jun 12 03:46:59 UTC 2024 - 5.3K bytes - Viewed (0)