Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for halse (0.14 sec)

  1. scan.go

    		}
    	case *[]map[string]interface{}:
    		columnTypes, _ := rows.ColumnTypes()
    		for initialized || rows.Next() {
    			prepareValues(values, db, columnTypes, columns)
    
    			initialized = false
    			db.RowsAffected++
    			db.AddError(rows.Scan(values...))
    
    			mapValue := map[string]interface{}{}
    			scanIntoMap(mapValue, values, columns)
    			*dest = append(*dest, mapValue)
    		}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Apr 26 09:53:11 GMT 2024
    - 9.8K bytes
    - Viewed (0)
  2. utils/utils.go

    			return true
    		}
    	}
    	return false
    }
    
    func AssertEqual(x, y interface{}) bool {
    	if reflect.DeepEqual(x, y) {
    		return true
    	}
    	if x == nil || y == nil {
    		return false
    	}
    
    	xval := reflect.ValueOf(x)
    	yval := reflect.ValueOf(y)
    	if xval.Kind() == reflect.Ptr && xval.IsNil() ||
    		yval.Kind() == reflect.Ptr && yval.IsNil() {
    		return false
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 22 06:43:02 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  3. migrator/migrator.go

    		}
    	}
    
    	return
    }
    
    func (m Migrator) GetQueryAndExecTx() (queryTx, execTx *gorm.DB) {
    	queryTx = m.DB.Session(&gorm.Session{})
    	execTx = queryTx
    	if m.DB.DryRun {
    		queryTx.DryRun = false
    		execTx = m.DB.Session(&gorm.Session{Logger: &printSQLLogger{Interface: m.DB.Logger}})
    	}
    	return queryTx, execTx
    }
    
    // AutoMigrate auto migrate values
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Apr 26 07:15:49 GMT 2024
    - 29K bytes
    - Viewed (0)
  4. clause/where_test.go

    				Exprs: []clause.Expression{clause.Not(clause.Eq{Column: clause.PrimaryColumn, Value: "1"}, clause.Gt{Column: "age", Value: 18}), clause.And(clause.Expr{SQL: "`score` <= ?", Vars: []interface{}{100}, WithoutParentheses: false})},
    			}},
    			"SELECT * FROM `users` WHERE (`users`.`id` <> ? AND `age` <= ?) AND `score` <= ?",
    			[]interface{}{"1", 18, 100},
    		},
    		{
    			[]clause.Interface{clause.Select{}, clause.From{}, clause.Where{
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:22:53 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  5. tests/preload_test.go

    	}
    }
    
    func TestPreloadWithConds(t *testing.T) {
    	users := []User{
    		*GetUser("slice_nested_preload_1", Config{Account: true}),
    		*GetUser("slice_nested_preload_2", Config{Account: false}),
    		*GetUser("slice_nested_preload_3", Config{Account: true}),
    	}
    
    	if err := DB.Create(&users).Error; err != nil {
    		t.Fatalf("errors happened when create: %v", err)
    	}
    
    	var userIDs []uint
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:21:03 GMT 2024
    - 14.9K bytes
    - Viewed (0)
  6. clause/where.go

    			}
    			break
    		}
    	}
    
    	buildExprs(where.Exprs, builder, AndWithSpace)
    }
    
    func buildExprs(exprs []Expression, builder Builder, joinCond string) {
    	wrapInParentheses := false
    
    	for idx, expr := range exprs {
    		if idx > 0 {
    			if v, ok := expr.(OrConditions); ok && len(v.Exprs) == 1 {
    				builder.WriteString(OrWithSpace)
    			} else {
    				builder.WriteString(joinCond)
    			}
    		}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:22:53 GMT 2024
    - 5.1K bytes
    - Viewed (0)
Back to top