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__ Declare the instance attribute slots reserved by this class.
Instance Variable column_type Logical column type used by the SQL compiler.
Instance Variable comment_text Comment attached to the column definition.
Instance Variable default_value Default value supplied through _NO_DEFAULT.
Instance Variable foreign_ref Foreign-key target referenced by this column.
Instance Variable has_index Has index flag used by ColumnDefinition.
Instance Variable is_auto_increment Is auto increment flag used by ColumnDefinition.
Instance Variable is_nullable Is nullable flag used by ColumnDefinition.
Instance Variable is_primary Is primary flag used by ColumnDefinition.
Instance Variable is_unique Is unique flag used by ColumnDefinition.
Instance Variable name Attribute name is attached later by the model metaclass.
def __init__(self, column_type: ColumnType, options: ColumnOptions | None = None): (source)

Initialize the column definition with its type metadata.

Parameters
column_type:orionis.orm.schema.types.ColumnTypeLogical column type used by the SQL compiler.
options:orionis.orm.schema.column.ColumnOptions or None, optionalType-specific knobs mirroring the SQLAlchemy constructor keywords of the concrete subclass. Defaults to every orionis.orm.schema.column.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
orionis.orm.schema.column.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
orionis.orm.schema.column.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:typing.AnyStatic value, or a zero-argument callable evaluated per insert.
Returns
orionis.orm.schema.column.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
orionis.orm.schema.column.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
orionis.orm.schema.column.ColumnDefinitionThe same definition, enabling fluent chaining.
def nullable(self) -> ColumnDefinition: (source)

Allow the column to store NULL values.

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

Mark the column as the primary key of the table.

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

Add a unique constraint to the column.

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

Declare the instance attribute slots reserved by this class.

column_type = (source)

Logical column type used by the SQL compiler.

comment_text: str | None = (source)

Comment attached to the column definition.

default_value: Any = (source)

Default value supplied through _NO_DEFAULT.

foreign_ref: ForeignReference | None = (source)

Foreign-key target referenced by this column.

has_index: bool = (source)

Has index flag used by ColumnDefinition.

is_auto_increment: bool = (source)

Is auto increment flag used by ColumnDefinition.

is_nullable: bool = (source)

Is nullable flag used by ColumnDefinition.

is_primary: bool = (source)

Is primary flag used by ColumnDefinition.

is_unique: bool = (source)

Is unique flag used by ColumnDefinition.

Attribute name is attached later by the model metaclass.