Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 17 of 17 for Walker (0.15 sec)

  1. statement.go

    		}
    	}
    
    	conds := make([]clause.Expression, 0, 4)
    	args = append([]interface{}{query}, args...)
    	for idx, arg := range args {
    		if arg == nil {
    			continue
    		}
    		if valuer, ok := arg.(driver.Valuer); ok {
    			arg, _ = valuer.Value()
    		}
    
    		switch v := arg.(type) {
    		case clause.Expression:
    			conds = append(conds, v)
    		case *DB:
    			v.executeScopes()
    
    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)
  2. tests/serializer_test.go

    	DB.Migrator().DropTable(adaptorSerializerModel(&SerializerStruct{}))
    	if err := DB.Migrator().AutoMigrate(adaptorSerializerModel(&SerializerStruct{})); err != nil {
    		t.Fatalf("no error should happen when migrate scanner, valuer struct, got error %v", err)
    	}
    
    	createdAt := time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC)
    	updatedAt := createdAt.Unix()
    
    	data := SerializerStruct{
    		Name:            []byte("jinzhu"),
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Apr 21 14:09:38 GMT 2023
    - 7.6K bytes
    - Viewed (0)
  3. schema/field.go

    	}
    
    	fieldValue := reflect.New(field.IndirectFieldType)
    	// if field is valuer, used its value or first field as data type
    	valuer, isValuer := fieldValue.Interface().(driver.Valuer)
    	if isValuer {
    		if _, ok := fieldValue.Interface().(GormDataTypeInterface); !ok {
    			if v, err := valuer.Value(); reflect.ValueOf(v).IsValid() && err == nil {
    				fieldValue = reflect.ValueOf(v)
    			}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 32K bytes
    - Viewed (1)
  4. utils/utils_test.go

    		{"error not equal", errors.New("1"), errors.New("2"), false},
    		{"driver.Valuer equal", ModifyAt{Time: now, Valid: true}, ModifyAt{Time: now, Valid: true}, true},
    		{"driver.Valuer not equal", ModifyAt{Time: now, Valid: true}, ModifyAt{Time: now.Add(time.Second), Valid: true}, false},
    		{"driver.Valuer equal (ptr to nil ptr)", (*ModifyAt)(nil), &ModifyAt{}, false},
    	}
    	for _, test := range assertEqualTests {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Feb 19 03:42:25 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  5. tests/tests_all.sh

          SQLCMDPASSWORD=LoremIpsum86 sqlcmd -U sa -S localhost:9930 -Q "IF USER_ID (N'gorm') IS NULL CREATE USER gorm FROM LOGIN gorm; ALTER SERVER ROLE sysadmin ADD MEMBER [gorm];" > /dev/null || true
        else
          docker-compose start
        fi
        cd ..
      fi
    fi
    
    
    for dialect in "${dialects[@]}" ; do
    Shell Script
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Feb 08 08:29:09 GMT 2023
    - 1.6K bytes
    - Viewed (0)
  6. tests/tests_test.go

    		// SQLCMDPASSWORD=LoremIpsum86 sqlcmd -U sa -S localhost:9930
    		// CREATE DATABASE gorm;
    		// GO
    		// CREATE LOGIN gorm WITH PASSWORD = 'LoremIpsum86';
    		// CREATE USER gorm FROM LOGIN gorm;
    		// ALTER SERVER ROLE sysadmin ADD MEMBER [gorm];
    		// GO
    		log.Println("testing sqlserver...")
    		if dbDSN == "" {
    			dbDSN = sqlserverDSN
    		}
    		db, err = gorm.Open(sqlserver.Open(dbDSN), cfg)
    	case "tidb":
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Dec 15 08:36:08 GMT 2023
    - 3.3K bytes
    - Viewed (1)
  7. schema/relationship.go

    			schema.guessRelation(relation, field, guessEmbeddedHas)
    		// case guessEmbeddedHas:
    		default:
    			schema.err = fmt.Errorf("invalid field found for struct %v's field %s: define a valid foreign key for relations or implement the Valuer/Scanner interface",
    				schema, field.Name)
    		}
    	}
    
    	switch gl {
    	case guessBelongs:
    		primarySchema, foreignSchema = relation.FieldSchema, schema
    	case guessEmbeddedBelongs:
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 22.4K bytes
    - Viewed (0)
Back to top