- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 20 for primary_key (0.22 sec)
-
docs_src/sql_databases/sql_app_py39/models.py
class User(Base): __tablename__ = "users" id = Column(Integer, primary_key=True) email = Column(String, unique=True, index=True) hashed_password = Column(String) is_active = Column(Boolean, default=True) items = relationship("Item", back_populates="owner") class Item(Base): __tablename__ = "items" id = Column(Integer, primary_key=True) title = Column(String, index=True)
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Jan 09 14:35:33 GMT 2024 - 710 bytes - Viewed (0) -
docs_src/sql_databases/sql_app/models.py
class User(Base): __tablename__ = "users" id = Column(Integer, primary_key=True) email = Column(String, unique=True, index=True) hashed_password = Column(String) is_active = Column(Boolean, default=True) items = relationship("Item", back_populates="owner") class Item(Base): __tablename__ = "items" id = Column(Integer, primary_key=True) title = Column(String, index=True)
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Jan 09 14:35:33 GMT 2024 - 710 bytes - Viewed (0) -
docs_src/sql_databases/sql_app_py310/models.py
class User(Base): __tablename__ = "users" id = Column(Integer, primary_key=True) email = Column(String, unique=True, index=True) hashed_password = Column(String) is_active = Column(Boolean, default=True) items = relationship("Item", back_populates="owner") class Item(Base): __tablename__ = "items" id = Column(Integer, primary_key=True) title = Column(String, index=True)
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Jan 09 14:35:33 GMT 2024 - 710 bytes - Viewed (0) -
tests/postgres_test.go
t.Fatalf("failed to found column log_id") } } type Post struct { ID uuid.UUID `gorm:"primary_key;type:uuid;default:uuid_generate_v4();"` Title string Categories []*Category `gorm:"Many2Many:post_categories"` } type Category struct { ID uuid.UUID `gorm:"primary_key;type:uuid;default:uuid_generate_v4();"` Title string Posts []*Post `gorm:"Many2Many:post_categories"` }
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) -
docs_src/async_sql_databases/tutorial001.py
database = databases.Database(DATABASE_URL) metadata = sqlalchemy.MetaData() notes = sqlalchemy.Table( "notes", metadata, sqlalchemy.Column("id", sqlalchemy.Integer, primary_key=True), sqlalchemy.Column("text", sqlalchemy.String), sqlalchemy.Column("completed", sqlalchemy.Boolean), ) engine = sqlalchemy.create_engine( DATABASE_URL, connect_args={"check_same_thread": False}
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 1.4K 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 May 05 09:35:13 GMT 2024 - Last Modified: Thu Jan 06 07:02:53 GMT 2022 - 1.9K bytes - Viewed (0) -
tests/customize_field_test.go
import ( "testing" "time" "gorm.io/gorm" . "gorm.io/gorm/utils/tests" ) func TestCustomizeColumn(t *testing.T) { type CustomizeColumn struct { ID int64 `gorm:"column:mapped_id; primary_key:yes"` Name string `gorm:"column:mapped_name"` Date *time.Time `gorm:"column:mapped_time"` } DB.Migrator().DropTable(&CustomizeColumn{}) DB.AutoMigrate(&CustomizeColumn{}) expected := "foo"
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Sep 11 09:33:31 GMT 2020 - 6.9K bytes - Viewed (0) -
dbflute_fess/dfprop/littleAdjustmentMap.dfprop
# ; DESCRIPTION = CachedMemberStatus.get(this, "$$columnName$$", $$primaryKey$$) # } # ; MEMBER_SECURITY = map:{ # ; REMINDER_ANSWER = CachedMemberSecurity.get(this, "$$columnName$$", $$primaryKey$$) # ; REMINDER_QUESTION = CachedMemberSecurity.get(this, "$$columnName$$", $$primaryKey$$) # } # } #} # - - - - - - - - - -/
Plain Text - Registered: Mon May 06 08:04:11 GMT 2024 - Last Modified: Sat Jul 25 06:04:16 GMT 2015 - 8.8K bytes - Viewed (0) -
schema/schema_helper_test.go
for _, rf := range r.References { var primaryKey, primaryKeySchema string if rf.PrimaryKey != nil { primaryKey, primaryKeySchema = rf.PrimaryKey.Name, rf.PrimaryKey.Schema.Name } refs = append(refs, fmt.Sprintf( "{PrimaryKey: %v PrimaryKeySchame: %v ForeignKey: %v ForeignKeySchema: %v PrimaryValue: %v OwnPrimaryKey: %v}",
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Dec 15 08:31:23 GMT 2023 - 7.5K bytes - Viewed (0) -
utils/tests/models.go
Name string CustomID string Type string } type Company struct { ID int Name string } type Language struct { Code string `gorm:"primarykey"` Name string } type Coupon struct { ID int `gorm:"primarykey; size:255"` AppliesToProduct []*CouponProduct `gorm:"foreignKey:CouponId;constraint:OnDelete:CASCADE"` AmountOff uint32 `gorm:"column:amount_off"`
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Dec 15 08:36:08 GMT 2023 - 2.1K bytes - Viewed (0)