- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for AssignmentColumns (0.1 sec)
-
callbacks/associations.go
} } } if elems.Len() > 0 { assignmentColumns := make([]string, 0, len(rel.References)) for _, ref := range rel.References { assignmentColumns = append(assignmentColumns, ref.ForeignKey.DBName) } saveAssociations(db, rel, elems, selectColumns, restricted, assignmentColumns) } case reflect.Struct:
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Apr 11 03:06:13 UTC 2023 - 14.3K bytes - Viewed (0) -
clause/set.go
assignments := make([]Assignment, len(keys)) for idx, key := range keys { assignments[idx] = Assignment{Column: Column{Name: key}, Value: values[key]} } return assignments } func AssignmentColumns(values []string) Set { assignments := make([]Assignment, len(values)) for idx, value := range values { assignments[idx] = Assignment{Column: Column{Name: value}, Value: Column{Table: "excluded", Name: value}} }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Nov 29 03:02:44 UTC 2021 - 1.4K bytes - Viewed (0) -
callbacks/create.go
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Apr 08 03:29:55 UTC 2024 - 12.5K bytes - Viewed (0) -
tests/upsert_test.go
for idx, lang := range langs { lang.Name = lang.Name + "_new" langs[idx] = lang } if err := DB.Clauses(clause.OnConflict{ Columns: []clause.Column{{Name: "code"}}, DoUpdates: clause.AssignmentColumns([]string{"name"}), }).Create(&langs).Error; err != nil { t.Fatalf("failed to upsert, got %v", err) } for _, lang := range langs { var results []Language
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Sep 05 07:39:19 UTC 2022 - 11.4K bytes - Viewed (0)