Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for Fields (0.19 sec)

  1. scan.go

    			mapValue[column] = nil
    		}
    	}
    }
    
    func (db *DB) scanIntoStruct(rows Rows, reflectValue reflect.Value, values []interface{}, fields []*schema.Field, joinFields [][]*schema.Field) {
    	for idx, field := range fields {
    		if field != nil {
    			values[idx] = field.NewValuePool.Get()
    		} else if len(fields) == 1 {
    			if reflectValue.CanAddr() {
    				values[idx] = reflectValue.Addr().Interface()
    			} else {
    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. chainable_api.go

    	tx.Statement.Distinct = true
    	if len(args) > 0 {
    		tx = tx.Select(args[0], args[1:]...)
    	}
    	return
    }
    
    // Select specify fields that you want when querying, creating, updating
    //
    // Use Select when you only want a subset of the fields. By default, GORM will select all fields.
    // Select accepts both string arguments and arrays.
    //
    //	// Select name and age of user using multiple arguments
    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)
  3. errors.go

    	// ErrModelValueRequired model value required
    	ErrModelValueRequired = errors.New("model value required")
    	// ErrModelAccessibleFieldsRequired model accessible fields required
    	ErrModelAccessibleFieldsRequired = errors.New("model accessible fields required")
    	// ErrSubQueryRequired sub query required
    	ErrSubQueryRequired = errors.New("sub query required")
    	// ErrInvalidData unsupported data
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Apr 26 02:53:17 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  4. migrator/migrator.go

    	expr.SQL = m.DataTypeOf(field)
    
    	if field.NotNull {
    		expr.SQL += " NOT NULL"
    	}
    
    	if field.HasDefaultValue && (field.DefaultValueInterface != nil || field.DefaultValue != "") {
    		if field.DefaultValueInterface != nil {
    			defaultStmt := &gorm.Statement{Vars: []interface{}{field.DefaultValueInterface}}
    			m.Dialector.BindVarTo(defaultStmt, defaultStmt, field.DefaultValueInterface)
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Apr 26 07:15:49 GMT 2024
    - 29K bytes
    - Viewed (0)
  5. callbacks/preload.go

    				tx.AddError(rel.Field.Set(tx.Statement.Context, reflectValue.Index(i), reflect.MakeSlice(rel.Field.IndirectFieldType, 0, 10).Interface()))
    			default:
    				tx.AddError(rel.Field.Set(tx.Statement.Context, reflectValue.Index(i), reflect.New(rel.Field.FieldType).Interface()))
    			}
    		}
    	}
    
    	for i := 0; i < reflectResults.Len(); i++ {
    		elem := reflectResults.Index(i)
    		for idx, field := range relForeignFields {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:21:03 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  6. tests/query_test.go

    	}
    
    	stmt := dryDB.Clauses(clause.OrderBy{
    		Expression: clause.Expr{SQL: "FIELD(id,?)", Vars: []interface{}{[]int{1, 2, 3}}, WithoutParentheses: true},
    	}).Find(&User{}).Statement
    
    	explainedSQL := dryDB.Dialector.Explain(stmt.SQL.String(), stmt.Vars...)
    	if !regexp.MustCompile("SELECT \\* FROM .*users.* ORDER BY FIELD\\(id,1,2,3\\)").MatchString(explainedSQL) {
    		t.Fatalf("Build Order condition, but got %v", explainedSQL)
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:22:53 GMT 2024
    - 49.8K bytes
    - Viewed (0)
Back to top