- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 14 for updateAll (0.3 sec)
-
clause/on_conflict.go
package clause type OnConflict struct { Columns []Column Where Where TargetWhere Where OnConstraint string DoNothing bool DoUpdates Set UpdateAll bool } func (OnConflict) Name() string { return "ON CONFLICT" } // Build build onConflict clause func (onConflict OnConflict) Build(builder Builder) { if onConflict.OnConstraint != "" { builder.WriteString("ON CONSTRAINT ")
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Fri Oct 07 05:46:20 UTC 2022 - 1.3K bytes - Viewed (0) -
tests/upsert_test.go
} else if langs[0].Name != "upsert-new" { t.Errorf("should update name on conflict, but got name %+v", langs[0].Name) } lang = Language{Code: "upsert", Name: "Upsert-Newname"} if err := DB.Clauses(clause.OnConflict{UpdateAll: true}).Create(&lang).Error; err != nil { t.Fatalf("failed to upsert, got %v", err) } var result Language if err := DB.Find(&result, "code = ?", lang.Code).Error; err != nil || result.Name != lang.Name {
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Mon Sep 05 07:39:19 UTC 2022 - 11.4K bytes - Viewed (0) -
callbacks/associations.go
for _, dbName := range s.PrimaryFieldDBNames { onConflict.Columns = append(onConflict.Columns, clause.Column{Name: dbName}) } onConflict.UpdateAll = stmt.DB.FullSaveAssociations if !onConflict.UpdateAll { onConflict.DoUpdates = clause.AssignmentColumns(defaultUpdatingColumns) } } else { onConflict.DoNothing = true } return }
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Tue Apr 11 03:06:13 UTC 2023 - 14.3K bytes - Viewed (0) -
tests/postgres_test.go
DB.Create(&thing) thing2 := Thing{ SomeID: "1234", OtherID: "1234", Data: "something else", } result := DB.Clauses(clause.OnConflict{ OnConstraint: "some_id_other_id_unique", UpdateAll: true, }).Create(&thing2) if result.Error != nil { t.Errorf("creating second thing: %v", result.Error) } var things []Thing if err := DB.Find(&things).Error; err != nil {
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Sat Oct 08 09:16:32 UTC 2022 - 6.4K bytes - Viewed (0) -
callbacks/create.go
} } } default: stmt.AddError(gorm.ErrInvalidData) } } if c, ok := stmt.Clauses["ON CONFLICT"]; ok { if onConflict, _ := c.Expression.(clause.OnConflict); onConflict.UpdateAll { if stmt.Schema != nil && len(values.Columns) >= 1 { selectColumns, restricted := stmt.SelectAndOmitColumns(true, true) columns := make([]string, 0, len(values.Columns)-1)
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Mon Apr 08 03:29:55 UTC 2024 - 12.5K bytes - Viewed (0) -
finisher_api.go
reflectValue = reflect.Indirect(reflectValue) } switch reflectValue.Kind() { case reflect.Slice, reflect.Array: if _, ok := tx.Statement.Clauses["ON CONFLICT"]; !ok { tx = tx.Clauses(clause.OnConflict{UpdateAll: true}) } tx = tx.callbacks.Create().Execute(tx.Set("gorm:update_track_time", true)) case reflect.Struct: if err := tx.Statement.Parse(value); err == nil && tx.Statement.Schema != nil {
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Fri Jan 12 08:42:21 UTC 2024 - 22.7K bytes - Viewed (0) -
pkg/scheduler/internal/cache/cache.go
func (cache *cacheImpl) updateNodeInfoSnapshotList(logger klog.Logger, snapshot *Snapshot, updateAll bool) { snapshot.havePodsWithAffinityNodeInfoList = make([]*framework.NodeInfo, 0, cache.nodeTree.numNodes) snapshot.havePodsWithRequiredAntiAffinityNodeInfoList = make([]*framework.NodeInfo, 0, cache.nodeTree.numNodes) snapshot.usedPVCSet = sets.New[string]() if updateAll { // Take a snapshot of the nodes order in the tree
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Oct 24 09:56:48 UTC 2023 - 24.9K bytes - Viewed (0) -
tests/create_test.go
} err = DB.Create(&u).Error AssertEqual(t, err, nil) u.Name = "on-conflict-user-name-2" u.Email = "on-conflict-user-email-2" u.Mobile = "" err = DB.Clauses(clause.OnConflict{UpdateAll: true}).Create(&u).Error AssertEqual(t, err, nil) var u2 OnConflictUser err = DB.Where("id = ?", u.ID).First(&u2).Error AssertEqual(t, err, nil) AssertEqual(t, u2.Name, "on-conflict-user-name-2")
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Tue Mar 19 03:50:28 UTC 2024 - 26.4K bytes - Viewed (0) -
platforms/software/dependency-management/src/main/java/org/gradle/api/internal/artifacts/dsl/dependencies/LockHandling.java
* limitations under the License. */ package org.gradle.api.internal.artifacts.dsl.dependencies; public enum LockHandling { VALIDATE, CREATE, UPDATE_ALL
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Tue Oct 10 21:10:11 UTC 2023 - 748 bytes - Viewed (0) -
cmd/admin-router.go
// Deprecated: Update MinIO servers. adminRouter.Methods(http.MethodPost).Path(adminVersion+"/update").HandlerFunc(adminMiddleware(adminAPI.ServerUpdateHandler, traceAllFlag)).Queries("updateURL", "{updateURL:.*}") // Info operations
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Sun Mar 10 21:09:36 UTC 2024 - 25.5K bytes - Viewed (0)