Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,514 for uint (0.02 sec)

  1. 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: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Thu Aug 28 02:57:17 UTC 2025
    - 13.3K bytes
    - Viewed (0)
  2. schema/relationship_test.go

    	type Toy struct {
    		ID        int
    		Name      string
    		OwnerID   int
    		OwnerType string
    	}
    	type User struct {
    		ID  int
    		Cat struct {
    			Name string
    			Toy  Toy   `gorm:"polymorphic:Owner;"`
    			Toys []Toy `gorm:"polymorphic:Owner;"`
    		} `gorm:"embedded;embeddedPrefix:cat_"`
    		Dog struct {
    			ID     int
    			Name   string
    			UserID int
    			Toy    Toy   `gorm:"polymorphic:Owner;"`
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Mon Aug 18 11:44:52 UTC 2025
    - 26.5K bytes
    - Viewed (0)
  3. schema/field.go

    		switch lowerVal {
    		case Bool, Int, Uint, Float, String, Time, Bytes:
    			field.DataType = lowerVal
    		default:
    			field.DataType = DataType(val)
    		}
    	}
    
    	if field.Size == 0 {
    		switch reflect.Indirect(fieldValue).Kind() {
    		case reflect.Int, reflect.Int64, reflect.Uint, reflect.Uint64, reflect.Float64:
    			field.Size = 64
    		case reflect.Int8, reflect.Uint8:
    			field.Size = 8
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Wed Aug 20 04:51:17 UTC 2025
    - 32K bytes
    - Viewed (0)
  4. tests/migrate_test.go

    	}
    }
    
    func TestMigrateIgnoreRelations(t *testing.T) {
    	type RelationModel1 struct {
    		ID uint
    	}
    	type RelationModel2 struct {
    		ID uint
    	}
    	type RelationModel3 struct {
    		ID               uint
    		RelationModel1ID uint
    		RelationModel1   *RelationModel1
    		RelationModel2ID uint
    		RelationModel2   *RelationModel2 `gorm:"-:migration"`
    	}
    
    	var err error
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Wed Aug 20 04:51:17 UTC 2025
    - 65.2K bytes
    - Viewed (0)
  5. tests/generics_test.go

    		t.Errorf("found invalid user, got %v, expect %v", u, user)
    	}
    
    	result := struct {
    		ID   int
    		Name string
    	}{}
    	if err := gorm.G[User](DB).Where("name = ?", user.Name).Scan(ctx, &result); err != nil {
    		t.Fatalf("failed to scan user, got error: %v", err)
    	} else if result.Name != user.Name || uint(result.ID) != user.ID {
    		t.Errorf("found invalid user, got %v, expect %v", result, user)
    	}
    
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Thu Sep 04 13:13:16 UTC 2025
    - 28K bytes
    - Viewed (0)
  6. cmd/erasure-metadata_test.go

    		ps := make([]int, N)
    		for i := range N {
    			if i < agree {
    				ps[i] = agreedParity
    				continue
    			}
    			ps[i] = disagreedParity // disagree
    		}
    		return ps
    	}
    
    	mkTest := func(N, parity, agree int) (res struct {
    		metaArr  []FileInfo
    		errs     []error
    		parities []int
    		parity   int
    	},
    	) {
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 13.4K bytes
    - Viewed (0)
  7. schema/schema.go

    				field.Schema.DeleteClauses = append(field.Schema.DeleteClauses, fc.DeleteClauses(field)...)
    			}
    		}
    	}
    
    	if field := schema.PrioritizedPrimaryField; field != nil {
    		switch field.GORMDataType {
    		case Int, Uint:
    			if _, ok := field.TagSettings["AUTOINCREMENT"]; !ok {
    				if !field.HasDefaultValue || field.DefaultValueInterface != nil {
    					schema.FieldsWithDefaultDBValue = append(schema.FieldsWithDefaultDBValue, field)
    				}
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Tue Aug 19 06:35:49 UTC 2025
    - 12.9K bytes
    - Viewed (0)
  8. docs/debugging/xl-meta/main.go

    	for _, file := range files {
    		meta, err := os.ReadFile(file + ".json")
    		if err != nil {
    			return nil, err
    		}
    		type erasureInfo struct {
    			V2Obj *struct {
    				EcDist    []int
    				EcIndex   int
    				EcM       int
    				EcN       int
    				Size      int
    				EcBSize   int
    				PartNums  []int
    				PartSizes []int
    				MetaUsr   struct {
    					Etag string `json:"etag"`
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 40.3K bytes
    - Viewed (0)
  9. cmd/utils.go

    	if globalVeeamForceSC != "" && s != storageclass.STANDARD && s != storageclass.RRS && isVeeamClient(ctx) {
    		return globalVeeamForceSC
    	}
    	return s
    }
    
    type ordered interface {
    	~int | ~int8 | ~int16 | ~int32 | ~int64 | ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr | ~float32 | ~float64 | string
    }
    
    // mapKeysSorted returns the map keys as a sorted slice.
    func mapKeysSorted[Map ~map[K]V, K ordered, V any](m Map) []K {
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 33K bytes
    - Viewed (0)
  10. cmd/batch-job-common-types.go

    type BatchJobYamlErr struct {
    	line, col int
    	msg       string
    }
    
    // message returns the error message excluding line, col information.
    // Intended to be used in unit tests.
    func (b BatchJobYamlErr) message() string {
    	return b.msg
    }
    
    // Error implements Error interface
    func (b BatchJobYamlErr) Error() string {
    	return fmt.Sprintf("%s\n Hint: error near line: %d, col: %d", b.msg, b.line, b.col)
    }
    
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 7.9K bytes
    - Viewed (0)
Back to top