- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for AutoIncrement (0.07 sec)
-
migrator/column_type.go
func (ct ColumnType) PrimaryKey() (isPrimaryKey bool, ok bool) { return ct.PrimaryKeyValue.Bool, ct.PrimaryKeyValue.Valid } // AutoIncrement returns the column is auto increment or not. func (ct ColumnType) AutoIncrement() (isAutoIncrement bool, ok bool) { return ct.AutoIncrementValue.Bool, ct.AutoIncrementValue.Valid } // Length returns the column type length for variable length column types
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Mar 24 01:31:58 UTC 2022 - 3.3K bytes - Viewed (0) -
tests/postgres_test.go
t.Fatalf("failed to get columns, got error %v", err) } hasLogID := false for _, column := range columns { if column.Name() == "log_id" { hasLogID = true autoIncrement, ok := column.AutoIncrement() if !ok || !autoIncrement { t.Fatalf("column log_id should be auto incrementment") } } } if !hasLogID { t.Fatalf("failed to found column log_id") } }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Oct 08 09:16:32 UTC 2022 - 6.4K bytes - Viewed (0) -
migrator.go
type ColumnType interface { Name() string DatabaseTypeName() string // varchar ColumnType() (columnType string, ok bool) // varchar(64) PrimaryKey() (isPrimaryKey bool, ok bool) AutoIncrement() (isAutoIncrement bool, ok bool) Length() (length int64, ok bool) DecimalSize() (precision int64, scale int64, ok bool) Nullable() (nullable bool, ok bool) Unique() (unique bool, ok bool) ScanType() reflect.Type
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Oct 30 09:15:49 UTC 2023 - 3.1K bytes - Viewed (0) -
tests/embedded_struct_test.go
if DB.Dialector.Name() != "sqlite" { t.Errorf("Failed to auto migrate advanced user, got error %v", err) } } } func TestEmbeddedTagSetting(t *testing.T) { type Tag1 struct { Id int64 `gorm:"autoIncrement"` } type Tag2 struct { Id int64 } type EmbeddedTag struct { Tag1 Tag1 `gorm:"Embedded;"` Tag2 Tag2 `gorm:"Embedded;EmbeddedPrefix:t2_"` Name string }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed May 08 04:07:58 UTC 2024 - 7.3K bytes - Viewed (0) -
schema/schema_helper_test.go
} if !ok { t.Errorf("schema %v failed to look up field with name %v", s, f.Name) } else { tests.AssertObjEqual(t, parsedField, f, "Name", "DBName", "BindNames", "DataType", "PrimaryKey", "AutoIncrement", "Creatable", "Updatable", "Readable", "HasDefaultValue", "DefaultValue", "NotNull", "Unique", "Comment", "Size", "Precision", "TagSettings") if f.DBName != "" {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Fri Dec 15 08:31:23 UTC 2023 - 7.5K bytes - Viewed (0)