- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 50 for primary_key (0.13 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"`
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Jan 06 07:02:53 UTC 2022 - 12.8K bytes - Viewed (0) -
docs_src/sql_databases/tutorial001_an_py310.py
from fastapi import Depends, FastAPI, HTTPException, Query from sqlmodel import Field, Session, SQLModel, create_engine, select class Hero(SQLModel, table=True): id: int | None = Field(default=None, primary_key=True) name: str = Field(index=True) age: int | None = Field(default=None, index=True) secret_name: str sqlite_file_name = "database.db" sqlite_url = f"sqlite:///{sqlite_file_name}"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 09 19:44:42 UTC 2024 - 1.7K bytes - Viewed (0) -
docs_src/sql_databases/tutorial001.py
from fastapi import Depends, FastAPI, HTTPException, Query from sqlmodel import Field, Session, SQLModel, create_engine, select class Hero(SQLModel, table=True): id: Union[int, None] = Field(default=None, primary_key=True) name: str = Field(index=True) age: Union[int, None] = Field(default=None, index=True) secret_name: str sqlite_file_name = "database.db" sqlite_url = f"sqlite:///{sqlite_file_name}"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 09 19:44:42 UTC 2024 - 1.8K bytes - Viewed (0) -
docs_src/sql_databases/tutorial001_py310.py
from fastapi import Depends, FastAPI, HTTPException, Query from sqlmodel import Field, Session, SQLModel, create_engine, select class Hero(SQLModel, table=True): id: int | None = Field(default=None, primary_key=True) name: str = Field(index=True) age: int | None = Field(default=None, index=True) secret_name: str sqlite_file_name = "database.db" sqlite_url = f"sqlite:///{sqlite_file_name}"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 09 19:44:42 UTC 2024 - 1.7K bytes - Viewed (0) -
docs_src/sql_databases/tutorial001_py39.py
from fastapi import Depends, FastAPI, HTTPException, Query from sqlmodel import Field, Session, SQLModel, create_engine, select class Hero(SQLModel, table=True): id: Union[int, None] = Field(default=None, primary_key=True) name: str = Field(index=True) age: Union[int, None] = Field(default=None, index=True) secret_name: str sqlite_file_name = "database.db" sqlite_url = f"sqlite:///{sqlite_file_name}"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 09 19:44:42 UTC 2024 - 1.8K 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"` }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Oct 08 09:16:32 UTC 2022 - 6.4K bytes - Viewed (0) -
docs_src/sql_databases/tutorial002_py310.py
class HeroBase(SQLModel): name: str = Field(index=True) age: int | None = Field(default=None, index=True) class Hero(HeroBase, table=True): id: int | None = Field(default=None, primary_key=True) secret_name: str class HeroPublic(HeroBase): id: int class HeroCreate(HeroBase): secret_name: str class HeroUpdate(HeroBase): name: str | None = None
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 09 19:44:42 UTC 2024 - 2.5K bytes - Viewed (0) -
docs_src/sql_databases/tutorial002_an.py
class HeroBase(SQLModel): name: str = Field(index=True) age: Union[int, None] = Field(default=None, index=True) class Hero(HeroBase, table=True): id: Union[int, None] = Field(default=None, primary_key=True) secret_name: str class HeroPublic(HeroBase): id: int class HeroCreate(HeroBase): secret_name: str class HeroUpdate(HeroBase): name: Union[str, None] = None
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 09 19:44:42 UTC 2024 - 2.6K bytes - Viewed (0) -
docs_src/sql_databases/tutorial002_py39.py
class HeroBase(SQLModel): name: str = Field(index=True) age: Union[int, None] = Field(default=None, index=True) class Hero(HeroBase, table=True): id: Union[int, None] = Field(default=None, primary_key=True) secret_name: str class HeroPublic(HeroBase): id: int class HeroCreate(HeroBase): secret_name: str class HeroUpdate(HeroBase): name: Union[str, None] = None
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 09 19:44:42 UTC 2024 - 2.6K bytes - Viewed (0) -
docs_src/sql_databases/tutorial001_an.py
from sqlmodel import Field, Session, SQLModel, create_engine, select from typing_extensions import Annotated class Hero(SQLModel, table=True): id: Union[int, None] = Field(default=None, primary_key=True) name: str = Field(index=True) age: Union[int, None] = Field(default=None, index=True) secret_name: str sqlite_file_name = "database.db" sqlite_url = f"sqlite:///{sqlite_file_name}"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 09 19:44:42 UTC 2024 - 1.8K bytes - Viewed (0)