- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for Increment (0.16 sec)
-
migrator/column_type.go
// PrimaryKey returns the column is primary key or not. 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
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Mar 24 01:31:58 GMT 2022 - 3.3K bytes - Viewed (0) -
callbacks/create.go
pkField = db.Statement.Schema.PrioritizedPrimaryField pkFieldName = db.Statement.Schema.PrioritizedPrimaryField.DBName } // append @id column with value for auto-increment primary key // the @id value is correct, when: 1. without setting auto-increment primary key, 2. database AutoIncrementIncrement = 1 switch values := db.Statement.Dest.(type) { case map[string]interface{}: values[pkFieldName] = insertID
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Apr 08 03:29:55 GMT 2024 - 12.5K bytes - Viewed (0) -
tests/postgres_test.go
log_id bigint NOT NULL ); ALTER TABLE public.log_usage ALTER COLUMN log_id ADD GENERATED BY DEFAULT AS IDENTITY ( SEQUENCE NAME public.log_usage_log_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1 ); `).Error; err != nil { t.Fatalf("failed to create table, got error %v", err) } columns, err := DB.Migrator().ColumnTypes("log_usage")
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Sat Oct 08 09:16:32 GMT 2022 - 6.4K bytes - Viewed (3) -
tests/migrate_test.go
for idx := 0; idx < ROWS; idx++ { if err := DB.Create(&AutoIncrementStruct{}).Error; err != nil { t.Fatalf("create auto_increment_struct fail, err: %v", err) } } rows := make([]*AutoIncrementStruct, 0, ROWS) if err := DB.Order("id ASC").Find(&rows).Error; err != nil { t.Fatalf("find auto_increment_struct fail, err: %v", err) } ids := make([]int64, 0, len(rows)) for _, row := range rows {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Mar 18 11:24:16 GMT 2024 - 56.2K bytes - Viewed (0) -
tests/preload_suits_test.go
func TestManyToManyPreloadWithMultiPrimaryKeys(t *testing.T) { if name := DB.Dialector.Name(); name == "sqlite" || name == "sqlserver" { t.Skip("skip sqlite, sqlserver due to it doesn't support multiple primary keys with auto increment") } type ( Level1 struct { ID uint `gorm:"primary_key;"` LanguageCode string `gorm:"primary_key"` Value string } Level2 struct {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Mar 18 05:38:46 GMT 2022 - 30.3K bytes - Viewed (0) -
tests/multi_primary_keys_test.go
} func TestManyToManyWithMultiPrimaryKeys(t *testing.T) { if name := DB.Dialector.Name(); name == "sqlite" || name == "sqlserver" { t.Skip("skip sqlite, sqlserver due to it doesn't support multiple primary keys with auto increment") } if name := DB.Dialector.Name(); name == "postgres" { stmt := gorm.Statement{DB: DB} stmt.Parse(&Blog{}) stmt.Schema.LookUpField("ID").Unique = true stmt.Parse(&Tag{})
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Jan 06 07:02:53 GMT 2022 - 12.8K bytes - Viewed (0) -
schema/relationship.go
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Apr 15 03:20:20 GMT 2024 - 22.4K bytes - Viewed (0)