ORIONIS API REFERENCE

THE ORIONIS API

Build with clarity.

Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.

class documentation

Framework-agnostic description of a database column.

Column types such as ~orionis.orm.schema.types.Integer or ~orionis.orm.schema.types.String subclass this definition and expose a fluent API to declare constraints. The definition never touches the underlying SQL engine; the database compiler translates it later.

Method __init__ Initialize the column definition with its type metadata.
Method __repr__ Return a concise developer representation of the column.
Method autoIncrement Mark the column as auto-incrementing.
Method comment Attach a descriptive comment rendered alongside the column DDL.
Method default Assign a default value applied when no value is provided on insert.
Method foreign Declare a foreign key pointing at another table column.
Method hasDefault Report whether a default value has been assigned.
Method index Create a non-unique index on the column.
Method nullable Allow the column to store NULL values.
Method primary Mark the column as the primary key of the table.
Method unique Add a unique constraint to the column.
Class Variable __slots__ Undocumented
Instance Variable column_type Undocumented
Instance Variable comment_text Undocumented
Instance Variable default_value Undocumented
Instance Variable foreign_ref Undocumented
Instance Variable has_index Undocumented
Instance Variable is_auto_increment Undocumented
Instance Variable is_nullable Undocumented
Instance Variable is_primary Undocumented
Instance Variable is_unique Undocumented
Instance Variable name Undocumented
def __init__(self, column_type: ColumnType, options: ColumnOptions | None = None): (source)

Initialize the column definition with its type metadata.

Parameters
column_type:ColumnTypeLogical column type used by the SQL compiler.
options:ColumnOptions or None, optionalType-specific knobs mirroring the SQLAlchemy constructor keywords of the concrete subclass. Defaults to every ColumnOptions field at its own default value.
Returns
NoneThis method does not return a value.
def __repr__(self) -> str: (source)

Return a concise developer representation of the column.

Returns
strRepresentation including name and logical type.
def autoIncrement(self) -> ColumnDefinition: (source)

Mark the column as auto-incrementing.

Returns
ColumnDefinitionThe same definition, enabling fluent chaining.
def comment(self, text: str) -> ColumnDefinition: (source)

Attach a descriptive comment rendered alongside the column DDL.

Parameters
text:strComment text stored by the database engine.
Returns
ColumnDefinitionThe same definition, enabling fluent chaining.
def default(self, value: Any) -> ColumnDefinition: (source)

Assign a default value applied when no value is provided on insert.

Parameters
value:AnyStatic value, or a zero-argument callable evaluated per insert.
Returns
ColumnDefinitionThe same definition, enabling fluent chaining.
def foreign(self, reference: str) -> ColumnDefinition: (source)

Declare a foreign key pointing at another table column.

Parameters
reference:strQualified reference in the form "table.column".
Returns
ColumnDefinitionThe same definition, enabling fluent chaining.
Raises
ValueErrorIf the reference is not a valid "table.column" string.
def hasDefault(self) -> bool: (source)

Report whether a default value has been assigned.

Returns
boolTrue when default was called with any value.
def index(self) -> ColumnDefinition: (source)

Create a non-unique index on the column.

Returns
ColumnDefinitionThe same definition, enabling fluent chaining.
def nullable(self) -> ColumnDefinition: (source)

Allow the column to store NULL values.

Returns
ColumnDefinitionThe same definition, enabling fluent chaining.
def primary(self) -> ColumnDefinition: (source)

Mark the column as the primary key of the table.

Returns
ColumnDefinitionThe same definition, enabling fluent chaining.
def unique(self) -> ColumnDefinition: (source)

Add a unique constraint to the column.

Returns
ColumnDefinitionThe same definition, enabling fluent chaining.
__slots__: tuple[str, ...] = (source)

Undocumented

column_type = (source)

Undocumented

comment_text: str | None = (source)

Undocumented

default_value: Any = (source)

Undocumented

foreign_ref: ForeignReference | None = (source)

Undocumented

has_index: bool = (source)

Undocumented

is_auto_increment: bool = (source)

Undocumented

is_nullable: bool = (source)

Undocumented

is_primary: bool = (source)

Undocumented

is_unique: bool = (source)

Undocumented

Undocumented