sqlite_database.column module
Column
- class sqlite_database.column.BuilderColumn(_from_typelist: list[str] | None = None)[source]
Bases:
object
Builder Column – Column Implementation using Builder Column
- on_delete(action: Literal['null', 'cascade', 'no act', 'default', 'restrict'])[source]
Set on delete action
- on_update(action: Literal['null', 'cascade', 'no act', 'default', 'restrict'])[source]
Set on update action
- class sqlite_database.column.Column(name: str, type_: str, foreign: bool = False, foreign_ref: str | None = None, primary: bool = False, unique: bool = False, nullable: bool = True, default: Any = None, on_delete: Literal['null', 'cascade', 'no act', 'default', 'restrict'] = 'cascade', on_update: Literal['null', 'cascade', 'no act', 'default', 'restrict'] = 'cascade')[source]
Bases:
object
tip: for foreign_ref, you can split with / to separate table and column name. e.g: user/id
- property default
Default value
- property foreign
Is foreign enabled?
- property name
Column Name
- property nullable
Nullable
- property on_delete
Delete setting
- property on_update
Update setting
- property primary
Is primary or not?
- property raw_source
Source / Foreign Reference
- property source
Source / Foreign Reference
- property source_column
Source column / Foreign reference column
- property type
Type
- property unique
Is unique
- sqlite_database.column.blob(name: str) BuilderColumn [source]
Create a blob column with name
- sqlite_database.column.integer(name: str) BuilderColumn [source]
Create a integer column with name
- sqlite_database.column.real(name: str) BuilderColumn [source]
Create a real column with name
- sqlite_database.column.text(name: str) BuilderColumn [source]
Create a text column with name