Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for mock (0.23 sec)

  1. 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
    //	db.Clauses(clause.Locking{Strength: "UPDATE"}).Find(&users)
    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)
  2. statement.go

    	changed := func(field *schema.Field) bool {
    		fieldValue, _ := field.ValueOf(stmt.Context, modelValue)
    		if v, ok := selectColumns[field.DBName]; (ok && v) || (!ok && !restricted) {
    			if mv, mok := stmt.Dest.(map[string]interface{}); mok {
    				if fv, ok := mv[field.Name]; ok {
    					return !utils.AssertEqual(fv, fieldValue)
    				} else if fv, ok := mv[field.DBName]; ok {
    					return !utils.AssertEqual(fv, fieldValue)
    				}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 19.8K bytes
    - Viewed (0)
  3. tests/sql_builder_test.go

    	// replace SQL quote, convert into postgresql like ""
    	expected = replaceQuoteInSQL(expected)
    	actually = replaceQuoteInSQL(actually)
    
    	// ignore updated_at value, because it's generated in Gorm internal, can't to mock value on update.
    	updatedAtRe := regexp.MustCompile(`(?i)"updated_at"=".+?"`)
    	actually = updatedAtRe.ReplaceAllString(actually, `"updated_at"=?`)
    	expected = updatedAtRe.ReplaceAllString(expected, `"updated_at"=?`)
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 16.7K bytes
    - Viewed (0)
Back to top