- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 16 for primarykey (0.15 sec)
-
finisher_api.go
func (db *DB) First(dest interface{}, conds ...interface{}) (tx *DB) { tx = db.Limit(1).Order(clause.OrderByColumn{ Column: clause.Column{Table: clause.CurrentTable, Name: clause.PrimaryKey}, }) if len(conds) > 0 { if exprs := tx.Statement.BuildCondition(conds[0], conds[1:]...); len(exprs) > 0 { tx.Statement.AddClause(clause.Where{Exprs: exprs}) } }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Sep 14 12:58:29 UTC 2024 - 22.8K bytes - Viewed (0) -
callbacks/query.go
for idx, ref := range relation.References { if ref.OwnPrimaryKey { exprs[idx] = clause.Eq{ Column: clause.Column{Table: parentTableName, Name: ref.PrimaryKey.DBName}, Value: clause.Column{Table: tableAliasName, Name: ref.ForeignKey.DBName}, } } else { if ref.PrimaryValue == "" { exprs[idx] = clause.Eq{
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Aug 22 11:03:42 UTC 2024 - 10.1K bytes - Viewed (1) -
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) -
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/tutorial002_an_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.5K 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_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) -
docs_src/sql_databases/tutorial001_an_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.7K 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)