Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for Vints (0.48 sec)

  1. tests/query_test.go

    	err := DB.Model(&User{}).Where("name like ?", "pluck_with_select%").Select("age + 1 as user_age").Pluck("user_age", &userAges).Error
    	if err != nil {
    		t.Fatalf("got error when pluck user_age: %v", err)
    	}
    
    	sort.Ints(userAges)
    
    	AssertEqual(t, userAges, []int{26, 27})
    }
    
    func TestSelectWithVariables(t *testing.T) {
    	DB.Save(&User{Name: "select_with_variables"})
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Apr 25 12:22:53 GMT 2024
    - 49.8K bytes
    - Viewed (0)
  2. cmd/admin-server-info.go

    			PauseEnd:   gcStats.PauseEnd,
    		},
    		MinioEnvVars: make(map[string]string, 10),
    	}
    
    	for poolNumber := range poolNumbers {
    		props.PoolNumbers = append(props.PoolNumbers, poolNumber)
    	}
    	sort.Ints(props.PoolNumbers)
    	props.PoolNumber = func() int {
    		if len(props.PoolNumbers) == 1 {
    			return props.PoolNumbers[0]
    		}
    		return math.MaxInt // this indicates that its unset.
    	}()
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 4.8K bytes
    - Viewed (0)
  3. cmd/storage-rest-server.go

    		return errXLBackend
    	}
    
    	return nil
    }
    
    // A single function to write certain errors to be fatal
    // or informative based on the `exit` flag, please look
    // at each implementation of error for added hints.
    //
    // FIXME: This is an unusual function but serves its purpose for
    // now, need to revisit the overall erroring structure here.
    // Do not like it :-(
    func logFatalErrs(err error, endpoint Endpoint, exit bool) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 44.8K bytes
    - Viewed (0)
  4. chainable_api.go

    // advanced techniques like specifying lock strength and optimizer hints. See the
    // [docs] for more depth.
    //
    //	// add a simple limit clause
    //	db.Clauses(clause.Limit{Limit: 1}).Find(&User{})
    //	// tell the optimizer to use the `idx_user_name` index
    //	db.Clauses(hints.UseIndex("idx_user_name")).Find(&User{})
    //	// specify the lock strength to UPDATE
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Wed Apr 17 03:38:55 GMT 2024
    - 14.3K bytes
    - Viewed (1)
Back to top