Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 112 for Updated (0.16 sec)

  1. tests/upsert_test.go

    	if user6.Name != "find or create" || user6.ID == 0 || user6.Age != 44 {
    		t.Errorf("user should be found and updated with assigned attrs")
    	}
    
    	DB.Where(&User{Name: "find or create"}).Find(&user7)
    	if user7.Name != "find or create" || user7.ID == 0 || user7.Age != 44 {
    		t.Errorf("user should be found and updated with assigned attrs")
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Sep 05 07:39:19 GMT 2022
    - 11.4K bytes
    - Viewed (0)
  2. tests/hooks_test.go

    	}
    
    	p2 := Product{Code: "update_callback", Price: 100}
    	DB.Save(&p2)
    
    	p2.Code = "dont_update"
    	if DB.Save(&p2).Error == nil {
    		t.Fatalf("An error from before update callbacks happened when update with invalid value")
    	}
    
    	if DB.Where("code = ?", "update_callback").First(&Product{}).Error != nil {
    		t.Fatalf("Record Should not be updated due to errors happened in before update callback")
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Feb 18 01:20:29 GMT 2023
    - 15.9K bytes
    - Viewed (0)
  3. cmd/erasure-healing-common_test.go

    	}
    
    	// List all the file commit ids from parts metadata.
    	modTimes := listObjectModtimes(partsMetadata, errs)
    
    	// Count all latest updated FileInfo values
    	var count int
    	var latestFileInfo FileInfo
    
    	// Reduce list of UUIDs to a single common value - i.e. the last updated Time
    	modTime := commonTime(modTimes, expectedRQuorum)
    
    	if modTime.IsZero() || modTime.Equal(timeSentinel) {
    		return FileInfo{}, errErasureReadQuorum
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jan 30 20:43:25 GMT 2024
    - 23K bytes
    - Viewed (1)
  4. tests/update_test.go

    	users := []*User{
    		GetUser("updates_01", Config{}),
    		GetUser("updates_02", Config{}),
    	}
    
    	DB.Create(&users)
    	lastUpdatedAt := users[0].UpdatedAt
    
    	// update with map
    	if res := DB.Model(users[0]).Updates(map[string]interface{}{"name": "updates_01_newname", "age": 100}); res.Error != nil || res.RowsAffected != 1 {
    		t.Errorf("Failed to update users")
    	}
    
    	if users[0].Name != "updates_01_newname" || users[0].Age != 100 {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Dec 04 03:50:58 GMT 2023
    - 30.3K bytes
    - Viewed (0)
  5. tests/table_test.go

    }
    
    func TestTableWithAllFields(t *testing.T) {
    	dryDB := DB.Session(&gorm.Session{DryRun: true, QueryFields: true})
    	userQuery := "SELECT .*user.*id.*user.*created_at.*user.*updated_at.*user.*deleted_at.*user.*name.*user.*age" +
    		".*user.*birthday.*user.*company_id.*user.*manager_id.*user.*active.* "
    
    	r := dryDB.Table("`user`").Find(&User{}).Statement
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Mar 09 09:31:28 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  6. cni/pkg/nodeagent/net.go

    // - this is because during add specifically, if CNI plugins have not finished executing,
    // K8S may get a pod Add event without any IPs in the object, and the pod will later be updated with IPs.
    //
    // We always need the IPs, but this is fine because this AddPodToMesh can be called from the CNI plugin as well,
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Tue Apr 30 22:24:38 GMT 2024
    - 12.2K bytes
    - Viewed (1)
  7. cmd/metrics-resource.go

    	metric.Avg = metric.Sum / float64(metric.Count)
    	subsysMetrics[key] = metric
    
    	resourceMetricsMap[subSys] = subsysMetrics
    }
    
    // updateDriveIOStats - Updates the drive IO stats by calculating the difference between the current and latest updated values.
    func updateDriveIOStats(currentStats madmin.DiskIOStats, latestStats madmin.DiskIOStats, labels map[string]string) {
    	sectorSize := uint64(512)
    	kib := float64(1 << 10)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Apr 23 23:56:12 GMT 2024
    - 17.4K bytes
    - Viewed (0)
  8. tests/associations_has_many_test.go

    		t.Fatalf("failed to create items, got error: %v", err)
    	}
    
    	// test Replace
    	if err := tx.Model(&item).Association("Contents").Unscoped().Replace([]ItemContent{
    		{Name: "updated name", LanguageCode: "en"},
    		{Name: "ar updated name", LanguageCode: "ar"},
    		{Name: "le nom", LanguageCode: "fr"},
    	}); err != nil {
    		t.Errorf("failed to replace item content, got error: %v", err)
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Dec 15 08:36:08 GMT 2023
    - 15.6K bytes
    - Viewed (0)
  9. cmd/storage-rest-server.go

    	}
    
    	// Collect updates, stream them before the full cache is sent.
    	updates := make(chan dataUsageEntry, 1)
    	var wg sync.WaitGroup
    	wg.Add(1)
    	go func() {
    		defer wg.Done()
    		for update := range updates {
    			resp := storageNSScannerRPC.NewResponse()
    			resp.Update = &update
    			out <- resp
    		}
    	}()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 44.8K bytes
    - Viewed (0)
  10. chainable_api.go

    	"gorm.io/gorm/utils"
    )
    
    // Model specify the model you would like to run db operations
    //
    //	// update all users's name to `hello`
    //	db.Model(&User{}).Update("name", "hello")
    //	// if user's primary key is non-blank, will use it as condition, then will only update that user's name to `hello`
    //	db.Model(&user).Update("name", "hello")
    func (db *DB) Model(value interface{}) (tx *DB) {
    	tx = db.getInstance()
    	tx.Statement.Model = value
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Apr 17 03:38:55 GMT 2024
    - 14.3K bytes
    - Viewed (1)
Back to top