- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for AUTOINCREMENT (0.06 sec)
-
schema/schema_test.go
Name: "ProductID", DBName: "product_id", BindNames: []string{"ProductID"}, DataType: schema.Uint, PrimaryKey: true, Size: 64, HasDefaultValue: true, AutoIncrement: true, TagSettings: map[string]string{"PRIMARYKEY": "PRIMARYKEY", "AUTOINCREMENT": "AUTOINCREMENT"}, } product.Fields = []*schema.Field{product.PrioritizedPrimaryField} checkSchemaField(t, product, &prioritizedPrimaryField, func(f *schema.Field) {
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Thu Aug 28 02:57:17 UTC 2025 - 13.3K bytes - Viewed (0) -
schema/field.go
Updatable: true, Readable: true, PrimaryKey: utils.CheckTruth(tagSetting["PRIMARYKEY"], tagSetting["PRIMARY_KEY"]), AutoIncrement: utils.CheckTruth(tagSetting["AUTOINCREMENT"]), HasDefaultValue: utils.CheckTruth(tagSetting["AUTOINCREMENT"]), NotNull: utils.CheckTruth(tagSetting["NOT NULL"], tagSetting["NOTNULL"]), Unique: utils.CheckTruth(tagSetting["UNIQUE"]),
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Sat Nov 22 03:14:36 UTC 2025 - 32.2K bytes - Viewed (0) -
schema/schema.go
schema.PrioritizedPrimaryField = schema.PrimaryFields[0] } else if len(schema.PrimaryFields) > 1 { // If there are multiple primary keys, the AUTOINCREMENT field is prioritized for _, field := range schema.PrimaryFields { if field.AutoIncrement { schema.PrioritizedPrimaryField = field break } } } } for _, field := range schema.PrimaryFields {
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Fri Oct 31 12:13:56 UTC 2025 - 13.1K bytes - Viewed (0) -
tests/gaussdb_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 Dec 28 09:35:17 UTC 2025 - Last Modified: Mon Jul 21 02:46:58 UTC 2025 - 6.6K 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 Dec 28 09:35:17 UTC 2025 - 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 Dec 28 09:35:17 UTC 2025 - Last Modified: Thu Aug 28 02:57:17 UTC 2025 - 7.5K bytes - Viewed (0) -
schema/relationship.go
Name: joinFieldName, PkgPath: ownField.StructField.PkgPath, Type: ownField.StructField.Type, Tag: removeSettingFromTag(appendSettingFromTag(ownField.StructField.Tag, "primaryKey"), "column", "autoincrement", "index", "unique", "uniqueindex"), }) } for idx, relField := range refForeignFields { joinFieldName := cases.Title(language.Und, cases.NoLower).String(relation.FieldSchema.Name) + relField.Name
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Sun Nov 16 04:11:05 UTC 2025 - 23.1K bytes - Viewed (1) -
tests/migrate_test.go
ID uint `gorm:"primarykey"` UID uint32 } type Event1 struct { ID uint `gorm:"primarykey"` UID uint32 `gorm:"not null;autoIncrement"` } type Event2 struct { ID uint `gorm:"primarykey"` UID uint16 `gorm:"not null;autoIncrement"` } var err error err = DB.Migrator().DropTable(&Event{}) if err != nil { t.Errorf("DropTable err:%v", err) }
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Wed Aug 20 04:51:17 UTC 2025 - 65.2K bytes - Viewed (0)