Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for UINT (0.64 sec)

  1. tests/preload_suits_test.go

    	type (
    		Level0 struct {
    			ID       uint
    			Value    string
    			Level1ID uint
    		}
    		Level1 struct {
    			ID         uint
    			Value      string
    			Level2ID   *uint
    			Level2_1ID *uint
    			Level0s    []Level0 `json:",omitempty"`
    		}
    		Level2 struct {
    			ID       uint
    			Level1s  []Level1
    			Level3ID uint
    		}
    		Level2_1 struct {
    			ID       uint
    			Level1s  []Level1 `json:",omitempty"`
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Fri Mar 18 05:38:46 UTC 2022
    - 30.3K bytes
    - Viewed (0)
  2. 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"`},
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Sat Feb 19 09:02:53 UTC 2022
    - 12.7K bytes
    - Viewed (0)
  3. tests/multi_primary_keys_test.go

    )
    
    type Blog struct {
    	ID         uint   `gorm:"primary_key"`
    	Locale     string `gorm:"primary_key"`
    	Subject    string
    	Body       string
    	Tags       []Tag `gorm:"many2many:blog_tags;"`
    	SharedTags []Tag `gorm:"many2many:shared_blog_tags;ForeignKey:id;References:id"`
    	LocaleTags []Tag `gorm:"many2many:locale_blog_tags;ForeignKey:id,locale;References:id"`
    }
    
    type Tag struct {
    	ID     uint   `gorm:"primary_key"`
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Thu Jan 06 07:02:53 UTC 2022
    - 12.8K bytes
    - Viewed (0)
  4. tests/associations_test.go

    	}
    }
    
    func TestForeignKeyConstraints(t *testing.T) {
    	tidbSkip(t, "not support the foreign key feature")
    
    	type Profile struct {
    		ID       uint
    		Name     string
    		MemberID uint
    	}
    
    	type Member struct {
    		ID      uint
    		Refer   uint `gorm:"uniqueIndex"`
    		Name    string
    		Profile Profile `gorm:"Constraint:OnUpdate:CASCADE,OnDelete:CASCADE;FOREIGNKEY:MemberID;References:Refer"`
    	}
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Feb 08 08:29:09 UTC 2023
    - 10.9K bytes
    - Viewed (0)
  5. schema/schema_test.go

    func TestCompositePrimaryKeyWithAutoIncrement(t *testing.T) {
    	type Product struct {
    		ProductID    uint `gorm:"primaryKey;autoIncrement"`
    		LanguageCode uint `gorm:"primaryKey"`
    		Code         string
    		Name         string
    	}
    	type ProductNonAutoIncrement struct {
    		ProductID    uint `gorm:"primaryKey;autoIncrement:false"`
    		LanguageCode uint `gorm:"primaryKey"`
    		Code         string
    		Name         string
    	}
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Fri Dec 15 08:31:23 UTC 2023
    - 12.9K bytes
    - Viewed (0)
  6. tests/preload_test.go

    	type (
    		Preload struct {
    			ID       uint
    			Value    string
    			NestedID uint
    		}
    		Join struct {
    			ID       uint
    			Value    string
    			NestedID uint
    		}
    		Nested struct {
    			ID       uint
    			Preloads []*Preload
    			Join     Join
    			ValueID  uint
    		}
    		Value struct {
    			ID     uint
    			Name   string
    			Nested Nested
    		}
    	)
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 10:00:47 UTC 2024
    - 15.9K bytes
    - Viewed (0)
  7. schema/field.go

    			}
    		}
    	case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
    		field.DataType = Uint
    		if field.HasDefaultValue && !skipParseDefaultValue {
    			if field.DefaultValueInterface, err = strconv.ParseUint(field.DefaultValue, 0, 64); err != nil {
    				schema.err = fmt.Errorf("failed to parse %s as default value for uint, got error: %v", field.DefaultValue, err)
    			}
    		}
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Apr 15 03:20:20 UTC 2024
    - 32K bytes
    - Viewed (0)
  8. tests/joins_test.go

    	type (
    		Furniture struct {
    			gorm.Model
    			OwnerID *uint
    		}
    
    		Owner struct {
    			gorm.Model
    			Furnitures []Furniture
    			CompanyID  *uint
    			Company    Company
    		}
    
    		Building struct {
    			gorm.Model
    			Name    string
    			OwnerID *uint
    			Owner   Owner
    		}
    	)
    
    	DB.Migrator().DropTable(&Building{}, &Owner{}, &Furniture{})
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 10:52:33 UTC 2024
    - 15K bytes
    - Viewed (0)
  9. tests/upsert_test.go

    		t.Errorf("belongs to association should be saved")
    	}
    }
    
    func TestUpdateWithMissWhere(t *testing.T) {
    	type User struct {
    		ID   uint   `gorm:"column:id;<-:create"`
    		Name string `gorm:"column:name"`
    	}
    	user := User{ID: 1, Name: "king"}
    	tx := DB.Session(&gorm.Session{DryRun: true}).Save(&user)
    
    	if err := tx.Error; err != nil {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Sep 05 07:39:19 UTC 2022
    - 11.4K bytes
    - Viewed (0)
  10. 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)
    	}
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Tue Mar 19 03:50:28 UTC 2024
    - 26.4K bytes
    - Viewed (0)
Back to top