- Sort Score
- Result 10 results
- Languages All
Results 21 - 25 of 25 for PRIMARY_KEY (0.07 sec)
-
docs/en/docs/tutorial/sql-databases.md
There are a few differences: * `table=True` tells SQLModel that this is a *table model*, it should represent a **table** in the SQL database, it's not just a *data model* (as would be any other regular Pydantic class). * `Field(primary_key=True)` tells SQLModel that the `id` is the **primary key** in the SQL database (you can learn more about SQL primary keys in the SQLModel docs).
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 02 05:06:56 UTC 2025 - 15.8K bytes - Viewed (0) -
docs/de/docs/tutorial/sql-databases.md
* `table=True` sagt SQLModel, dass dies ein *Tabellenmodell* ist, es soll eine **Tabelle** in der SQL-Datenbank darstellen, es ist nicht nur ein *Datenmodell* (wie es jede andere reguläre Pydantic-Klasse wäre). * `Field(primary_key=True)` sagt SQLModel, dass die `id` der **Primärschlüssel** in der SQL-Datenbank ist (Sie können mehr über SQL-Primärschlüssel in der SQLModel-Dokumentation erfahren).
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 02 17:32:56 UTC 2025 - 18.1K bytes - Viewed (0) -
docs/ko/docs/tutorial/sql-databases.md
몇 가지 차이점이 있습니다: * `table=True`는 SQLModel에 이 모델이 *테이블 모델*이며, 단순한 데이터 모델이 아니라 SQL 데이터베이스의 **테이블**을 나타낸다는 것을 알려줍니다. (다른 일반적인 Pydantic 클래스처럼) 단순한 *데이터 모델*이 아닙니다. * `Field(primary_key=True)`는 SQLModel에 `id`가 SQL 데이터베이스의 **기본 키**임을 알려줍니다 (SQL 기본 키에 대한 자세한 내용은 SQLModel 문서를 참고하세요). `int | None` 유형으로 설정하면, SQLModel은 해당 열이 SQL 데이터베이스에서 `INTEGER` 유형이며 `NULLABLE` 값이어야 한다는 것을 알 수 있습니다.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 24 16:14:29 UTC 2024 - 18K bytes - Viewed (0) -
tests/update_test.go
Name string Token Token `gorm:"foreignKey:UserID"` } func (t *TokenOwner) BeforeSave(tx *gorm.DB) error { t.Name += "_name" return nil } type Token struct { UserID int `gorm:"primary_key"` Content string `gorm:"type:varchar(100)"` } func (t *Token) BeforeSave(tx *gorm.DB) error { t.Content += "_encrypted" return nil } func TestSaveWithHooks(t *testing.T) {
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Mon Jul 21 02:46:58 UTC 2025 - 30.4K bytes - Viewed (0) -
tests/query_test.go
} AssertEqual(t, p, p2) } func TestStringPrimaryKeyForNumericValueStartingWithZero(t *testing.T) { type AddressByZipCode struct { ZipCode string `gorm:"primary_key"` Address string } DB.Migrator().DropTable(&AddressByZipCode{}) if err := DB.AutoMigrate(&AddressByZipCode{}); err != nil { t.Fatalf("failed to migrate, got error %v", err) }
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Tue Jul 22 06:21:04 UTC 2025 - 51K bytes - Viewed (0)