Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for updateAll (0.13 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. cmd/common-main.go

    	}
    
    	return server, nil
    }
    
    // Check for updates and print a notification message
    func checkUpdate(mode string) {
    	updateURL := minioReleaseInfoURL
    	if runtime.GOOS == globalWindowsOSName {
    		updateURL = minioReleaseWindowsInfoURL
    	}
    
    	u, err := url.Parse(updateURL)
    	if err != nil {
    		return
    	}
    
    	if currentReleaseTime.IsZero() {
    		return
    	}
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu May 30 11:58:12 UTC 2024
    - 31.5K bytes
    - Viewed (0)
Back to top