Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 36 for uint8 (0.17 sec)

  1. logger/sql.go

    // RegEx matches only numeric values
    var numericPlaceholderRe = regexp.MustCompile(`\$\d+\$`)
    
    func isNumeric(k reflect.Kind) bool {
    	switch k {
    	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
    		return true
    	case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
    		return true
    	case reflect.Float32, reflect.Float64:
    		return true
    	default:
    		return false
    	}
    }
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Mar 21 08:00:02 GMT 2024
    - 5K bytes
    - Viewed (0)
  2. scan.go

    			db.AddError(rows.Scan(values...))
    
    			mapValue := map[string]interface{}{}
    			scanIntoMap(mapValue, values, columns)
    			*dest = append(*dest, mapValue)
    		}
    	case *int, *int8, *int16, *int32, *int64,
    		*uint, *uint8, *uint16, *uint32, *uint64, *uintptr,
    		*float32, *float64,
    		*bool, *string, *time.Time,
    		*sql.NullInt32, *sql.NullInt64, *sql.NullFloat64,
    		*sql.NullBool, *sql.NullString, *sql.NullTime:
    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)
  3. utils/utils.go

    		return v
    	case int:
    		return strconv.FormatInt(int64(v), 10)
    	case int8:
    		return strconv.FormatInt(int64(v), 10)
    	case int16:
    		return strconv.FormatInt(int64(v), 10)
    	case int32:
    		return strconv.FormatInt(int64(v), 10)
    	case int64:
    		return strconv.FormatInt(v, 10)
    	case uint:
    		return strconv.FormatUint(uint64(v), 10)
    	case uint8:
    		return strconv.FormatUint(uint64(v), 10)
    	case uint16:
    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)
  4. schema/field_test.go

    		{Name: "UINT", DBName: "fuint", BindNames: []string{"UINT"}, DataType: schema.Uint, Creatable: true, Updatable: true, Readable: true, Size: 64, Tag: `gorm:"column:fuint"`},
    		{Name: "UINT8", DBName: "fuint8", BindNames: []string{"UINT8"}, DataType: schema.Uint, Creatable: true, Updatable: true, Readable: true, Size: 8, Tag: `gorm:"column:fuint8"`},
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Feb 19 09:02:53 GMT 2022
    - 12.7K bytes
    - Viewed (0)
  5. schema/relationship_test.go

    		Name      string
    		UserRefer uint
    	}
    
    	type User struct {
    		gorm.Model
    		Profiles  []Profile `gorm:"many2many:user_profiles;ForeignKey:Refer;JoinForeignKey:UserReferID;References:UserRefer;JoinReferences:ProfileRefer"`
    		Profiles2 []Profile `gorm:"many2many:user_profiles2;ForeignKey:refer;JoinForeignKey:user_refer_id;References:user_refer;JoinReferences:profile_refer"`
    		Refer     uint
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 25.5K bytes
    - Viewed (0)
  6. schema/serializer.go

    	rv := reflect.ValueOf(fieldValue)
    	switch v := fieldValue.(type) {
    	case int64, int, uint, uint64, int32, uint32, int16, uint16:
    		result = time.Unix(reflect.Indirect(rv).Int(), 0).UTC()
    	case *int64, *int, *uint, *uint64, *int32, *uint32, *int16, *uint16:
    		if rv.IsZero() {
    			return nil, nil
    		}
    		result = time.Unix(reflect.Indirect(rv).Int(), 0).UTC()
    	default:
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Mar 18 08:28:46 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  7. tests/soft_delete_test.go

    		t.Fatalf("invalid sql generated, got %v", actualSQL)
    	}
    }
    
    func TestSoftDeleteZeroValue(t *testing.T) {
    	type SoftDeleteBook struct {
    		ID        uint
    		Name      string
    		Pages     uint
    		DeletedAt gorm.DeletedAt `gorm:"zeroValue:'1970-01-01 00:00:01'"`
    	}
    	DB.Migrator().DropTable(&SoftDeleteBook{})
    	if err := DB.AutoMigrate(&SoftDeleteBook{}); err != nil {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Feb 01 06:40:55 GMT 2023
    - 5.7K bytes
    - Viewed (0)
  8. tests/joins_test.go

    		t.Fatalf("Failed to load with joins on, got error: %v", err)
    	}
    	AssertEqual(t, user2.NamedPet.Name, "joins-on_pet_2")
    }
    
    func TestJoinsWithSelect(t *testing.T) {
    	type result struct {
    		ID    uint
    		PetID uint
    		Name  string
    	}
    
    	user := *GetUser("joins_with_select", Config{Pets: 2})
    	DB.Save(&user)
    
    	var results []result
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Apr 26 14:19:32 GMT 2023
    - 13.5K bytes
    - Viewed (1)
  9. tests/create_test.go

    	AssertEqual(t, newUser.CreatedAt, curTime)
    	AssertEqual(t, newUser.UpdatedAt, curTime)
    }
    
    func TestCreateWithNoGORMPrimaryKey(t *testing.T) {
    	type JoinTable struct {
    		UserID   uint
    		FriendID uint
    	}
    
    	DB.Migrator().DropTable(&JoinTable{})
    	if err := DB.AutoMigrate(&JoinTable{}); err != nil {
    		t.Errorf("no error should happen when auto migrate, but got %v", err)
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Mar 19 03:50:28 GMT 2024
    - 26.4K bytes
    - Viewed (0)
  10. tests/embedded_struct_test.go

    		t.Errorf("Failed to create got error %v", err)
    	}
    }
    
    func TestEmbeddedRelations(t *testing.T) {
    	type EmbUser struct {
    		gorm.Model
    		Name      string
    		Age       uint
    		Languages []Language `gorm:"many2many:EmbUserSpeak;"`
    	}
    
    	type AdvancedUser struct {
    		EmbUser  `gorm:"embedded"`
    		Advanced bool
    	}
    
    	DB.Migrator().DropTable(&AdvancedUser{})
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Oct 26 03:58:13 GMT 2023
    - 7.3K bytes
    - Viewed (0)
Back to top