- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 41 for primary (0.19 sec)
-
tests/multi_primary_keys_test.go
package tests_test import ( "reflect" "sort" "testing" "gorm.io/gorm" . "gorm.io/gorm/utils/tests" ) 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"`
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Thu Jan 06 07:02:53 GMT 2022 - 12.8K bytes - Viewed (0) -
internal/s3select/sql/parser.go
ListExpr *ListExpr `parser:"| @@"` } // Grammar for Operand: // // operand → multOp ( ("-" | "+") multOp )* // multOp → unary ( ("/" | "*" | "%") unary )* // unary → "-" unary | primary // primary → Value | Variable | "(" expression ")" // // An Operand is a single term followed by an optional sequence of // terms separated by +/- type Operand struct { Left *MultOp `parser:"@@"`
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Thu Jan 18 07:03:17 GMT 2024 - 12.9K bytes - Viewed (0) -
tests/create_test.go
} jt := JoinTable{UserID: 1, FriendID: 2} err := DB.Create(&jt).Error if err != nil { t.Errorf("No error should happen when create a record without a GORM primary key. But in the database this primary key exists and is the union of 2 or more fields\n But got: %s", err) } } func TestSelectWithCreate(t *testing.T) {
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Tue Mar 19 03:50:28 GMT 2024 - 26.4K bytes - Viewed (0) -
internal/s3select/sql/utils.go
if operand.Right != nil || operand.Left.Right != nil || operand.Left.Left.Negated != nil || operand.Left.Left.Primary.JPathExpr == nil { return "", false } // Check if path expression ends in a key jpath := operand.Left.Left.Primary.JPathExpr n := len(jpath.PathExpr) if n > 0 && jpath.PathExpr[n-1].Key == nil { return "", false } ps := jpath.String()
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Wed Nov 10 16:12:50 GMT 2021 - 3.6K bytes - Viewed (0) -
internal/s3select/sql/statement.go
selectAST.Expression.Expressions[0].Expression.And[0].Condition[0].Operand.Operand.Left.Left.Primary != nil && selectAST.Expression.Expressions[0].Expression.And[0].Condition[0].Operand.Operand.Left.Left.Primary.JPathExpr != nil { if selectAST.Expression.Expressions[0].Expression.And[0].Condition[0].Operand.Operand.Left.Left.Primary.JPathExpr.String() == selectAST.From.As+".*" { selectAST.Expression.All = true } }
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Tue Jan 09 17:19:11 GMT 2024 - 8.9K bytes - Viewed (0) -
tests/non_std_test.go
package tests_test import ( "testing" "time" ) type Animal struct { Counter uint64 `gorm:"primary_key:yes"` Name string `gorm:"DEFAULT:'galeone'"` From string // test reserved sql keyword as field name Age *time.Time unexported string // unexported value CreatedAt time.Time UpdatedAt time.Time } func TestNonStdPrimaryKeyAndDefaultValues(t *testing.T) { DB.Migrator().DropTable(&Animal{})
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Thu Jan 06 07:02:53 GMT 2022 - 1.9K bytes - Viewed (0) -
schema/schema_test.go
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Fri Dec 15 08:31:23 GMT 2023 - 12.9K bytes - Viewed (0) -
tests/embedded_struct_test.go
} stmt := gorm.Statement{DB: DB} if err := stmt.Parse(&EngadgetPost{}); err != nil { t.Fatalf("failed to parse embedded struct") } else if len(stmt.Schema.PrimaryFields) != 1 { t.Errorf("should have only one primary field with embedded struct, but got %v", len(stmt.Schema.PrimaryFields)) } for _, name := range []string{"user_id", "user_name", "user_email"} { if !DB.Migrator().HasColumn(&HNPost{}, name) {
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Thu Oct 26 03:58:13 GMT 2023 - 7.3K bytes - Viewed (0) -
schema/field.go
Schema: schema, Creatable: true, Updatable: true, Readable: true, PrimaryKey: utils.CheckTruth(tagSetting["PRIMARYKEY"], tagSetting["PRIMARY_KEY"]), AutoIncrement: utils.CheckTruth(tagSetting["AUTOINCREMENT"]), HasDefaultValue: utils.CheckTruth(tagSetting["AUTOINCREMENT"]),
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Mon Apr 15 03:20:20 GMT 2024 - 32K bytes - Viewed (1) -
internal/disk/directio_unsupported.go
// For these systems we do not attempt to build the 'directio' dependency since // the O_DIRECT symbol may not be exposed resulting in a failed build. // // // On illumos an explicit O_DIRECT flag is not necessary for two primary // reasons. Note that ZFS is effectively the default filesystem on illumos // systems. // // One benefit of using DirectIO on Linux is that the page cache will not be
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Wed Oct 18 18:08:15 GMT 2023 - 2.6K bytes - Viewed (0)