Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 230 for Updated (0.22 sec)

  1. 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 Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Dec 04 03:50:58 GMT 2023
    - 30.3K bytes
    - Viewed (0)
  2. tests/customize_field_test.go

    		t.Fatalf("invalid create/update unix nano time: %#v", result)
    	}
    
    	result.FieldAllowUpdate = "field_allow_update_updated"
    	result.FieldReadonly = "field_readonly_updated"
    	result.FieldIgnore = "field_ignore_updated"
    	DB.Save(&result)
    
    	var result2 CustomizeFieldStruct
    	DB.Find(&result2, "name = ?", "create")
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Sep 11 09:33:31 GMT 2020
    - 6.9K bytes
    - Viewed (0)
  3. cmd/metacache-bucket.go

    	}
    }
    
    // updateCacheEntry will update a cache.
    // Returns the updated status.
    func (b *bucketMetacache) updateCacheEntry(update metacache) (metacache, error) {
    	b.mu.Lock()
    	defer b.mu.Unlock()
    	existing, ok := b.caches[update.id]
    	if !ok {
    		return update, errFileNotFound
    	}
    	existing.update(update)
    	b.caches[update.id] = existing
    	b.updated = true
    	return existing, nil
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 6.6K bytes
    - Viewed (0)
  4. internal/logger/targets.go

    	defer swapSystemMuRW.Unlock()
    
    	if consoleTgt == nil {
    		if t.Type() == types.TargetConsole {
    			consoleTgt = t
    		}
    	}
    	updated := append(make([]Target, 0, len(systemTargets)+1), systemTargets...)
    	updated = append(updated, t)
    	systemTargets = updated
    
    	return nil
    }
    
    func initKafkaTargets(ctx context.Context, cfgMap map[string]kafka.Config) ([]Target, []error) {
    	tgts := []Target{}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Apr 02 22:56:14 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  5. cmd/config-current_test.go

    	}
    
    	if err := saveServerConfig(context.Background(), objLayer, globalServerConfig); err != nil {
    		t.Fatalf("Unable to save updated config file %s", err)
    	}
    
    	// Initialize server config.
    	if err := loadConfig(objLayer, nil); err != nil {
    		t.Fatalf("Unable to initialize from updated config file %s", err)
    	}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Dec 19 19:10:14 GMT 2022
    - 2K bytes
    - Viewed (0)
  6. internal/logger/reqinfo.go

    	if r == nil {
    		return nil
    	}
    	r.Lock()
    	defer r.Unlock()
    	// Search of tag key already exists in tags
    	var updated bool
    	for _, tag := range r.tags {
    		if tag.Key == key {
    			tag.Val = val
    			updated = true
    			break
    		}
    	}
    	if !updated {
    		// Append to the end of tags list
    		r.tags = append(r.tags, KeyVal{key, val})
    	}
    	return r
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  7. tests/sql_builder_test.go

    	})
    	assertEqualSQL(t, `UPDATE "users" SET "created_at"='2021-10-18 00:00:00',"updated_at"='2021-10-18 19:50:09.438',"name"='bar',"age"=22 WHERE id = 100 AND "users"."deleted_at" IS NULL`, sql)
    
    	// update
    	sql = DB.ToSQL(func(tx *gorm.DB) *gorm.DB {
    		return tx.Model(&User{}).Where("id = ?", 100).Update("name", "Foo bar")
    	})
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 16.7K bytes
    - Viewed (0)
  8. schema/field_test.go

    	ID    uint
    	Name  string `gorm:"-"`
    	Name2 string `gorm:"->"`
    	Name3 string `gorm:"<-"`
    	Name4 string `gorm:"<-:create"`
    	Name5 string `gorm:"<-:update"`
    	Name6 string `gorm:"<-:create,update"`
    	Name7 string `gorm:"->:false;<-:create,update"`
    	Name8 string `gorm:"->;-:migration"`
    }
    
    func TestParseFieldWithPermission(t *testing.T) {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Sat Feb 19 09:02:53 GMT 2022
    - 12.7K bytes
    - Viewed (0)
  9. internal/cachevalue/cache.go

    // NewFromFunc allocates a new cached value instance and initializes it with an
    // update function, making it ready for use.
    func NewFromFunc[T any](ttl time.Duration, opts Opts, update func() (T, error)) *Cache[T] {
    	return &Cache[T]{
    		ttl:      ttl,
    		updateFn: update,
    		opts:     opts,
    	}
    }
    
    // InitOnce initializes the cache with a TTL and an update function. It is
    // guaranteed to be called only once.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Mar 01 16:00:42 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  10. 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 Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Sep 05 07:39:19 GMT 2022
    - 11.4K bytes
    - Viewed (0)
Back to top