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

class TableDefinition: (source)

View In Hierarchy

Framework-agnostic description of a database table.

Built once per model by the metaclass and consumed by the database compiler to produce engine-specific SQL. It carries no reference to the underlying SQL toolkit.

Method columnNames Return the declared column names in definition order.
Method hasColumn Report whether a column is declared on the table.
Instance Variable columns Column definitions keyed by attribute name.
Instance Variable comment Descriptive comment rendered alongside the table DDL.
Instance Variable composite_primary_key Column names forming a multi-column primary key. When set, it takes precedence over the single-column primary_key.
Instance Variable foreign_keys Multi-column foreign key constraints.
Instance Variable indexes Composite indexes spanning multiple columns.
Instance Variable name Logical table name without any connection prefix.
Instance Variable primary_key Name of the primary key column, when it is a single column.
Instance Variable schema Database schema owning the table, or None for the default.
Instance Variable unique_constraints Composite UNIQUE constraints spanning multiple columns.
def columnNames(self) -> tuple[str, ...]: (source)

Return the declared column names in definition order.

Returns
tuple of strOrdered column names.
def hasColumn(self, name: str) -> bool: (source)

Report whether a column is declared on the table.

Parameters
name:strColumn name to look up.
Returns
boolTrue when the column exists in the definition.

Column definitions keyed by attribute name.

comment: str or None = (source)

Descriptive comment rendered alongside the table DDL.

composite_primary_key: tuple of str or None = (source)

Column names forming a multi-column primary key. When set, it takes precedence over the single-column primary_key.

Multi-column foreign key constraints.

Composite indexes spanning multiple columns.

Logical table name without any connection prefix.

primary_key: str = (source)

Name of the primary key column, when it is a single column.

schema: str or None = (source)

Database schema owning the table, or None for the default.

unique_constraints: tuple of UniqueConstraint = (source)

Composite UNIQUE constraints spanning multiple columns.