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 Column: (source)
Create ColumnDefinition builders for schema declarations.
| Static Method | big |
Build a BIGINT column definition. |
| Static Method | boolean |
Build a boolean column definition. |
| Static Method | date |
Build a DATE column definition. |
| Static Method | date |
Build a DATETIME column definition. |
| Static Method | double |
Build a DOUBLE column definition. |
| Static Method | enum |
Build a string-backed enumeration column definition. |
| Static Method | float |
Build a FLOAT column definition. |
| Static Method | id |
Build a BIGINT primary key column definition. |
| Static Method | integer |
Build an INTEGER column definition. |
| Static Method | interval |
Build an INTERVAL column definition. |
| Static Method | large |
Build a large binary column definition. |
| Static Method | match |
Build a MATCH-operator return-type column definition. |
| Static Method | numeric |
Build a NUMERIC column definition. |
| Static Method | numeric |
Build a numeric-common placeholder column definition. |
| Static Method | pickle |
Build a pickle-backed column definition. |
| Static Method | schema |
Build a schema-level placeholder column definition. |
| Static Method | small |
Build a SMALLINT column definition. |
| Static Method | strict |
Build a SQL ARRAY column definition. |
| Static Method | strict |
Build a SQL BIGINT column definition. |
| Static Method | strict |
Build a SQL BINARY column definition. |
| Static Method | strict |
Build a SQL BLOB column definition. |
| Static Method | strict |
Build a SQL CHAR column definition. |
| Static Method | strict |
Build an Oracle/Informix CLOB column definition. |
| Static Method | strict |
Build a SQL DECIMAL column definition. |
| Static Method | strict |
Build a SQL DOUBLE PRECISION column definition. |
| Static Method | strict |
Build a SQL INT column definition, alias of INTEGER. |
| Static Method | strict |
Build a SQL JSON column definition. |
| Static Method | strict |
Build a SQL NCHAR column definition. |
| Static Method | strict |
Build a SQL NVARCHAR column definition. |
| Static Method | strict |
Build a SQL REAL column definition. |
| Static Method | strict |
Build a SQL SMALLINT column definition. |
| Static Method | strict |
Build a SQL TIMESTAMP column definition. |
| Static Method | strict |
Build a SQL VARBINARY column definition. |
| Static Method | strict |
Build a SQL VARCHAR column definition. |
| Static Method | string |
Build a VARCHAR column definition. |
| Static Method | text |
Build a TEXT/CLOB column definition. |
| Static Method | time |
Build a TIME column definition. |
| Static Method | unicode |
Build an NVARCHAR column definition. |
| Static Method | unicode |
Build an NCLOB/NTEXT column definition. |
| Static Method | uuid |
Build a UUID column definition. |
Build a BIGINT column definition.
| Parameters | |
name:str | Name assigned to the column. |
| Returns | |
BigInteger | Column definition ready for schema declarations. |
str, *, create_constraint: bool = False, constraint_name: str | None = None) -> Boolean:
(source)
¶
Build a boolean column definition.
| Parameters | |
name:str | Name assigned to the column. |
createbool, optional | When the boolean is emulated as int/smallint, also create a CHECK constraint ensuring 1 or 0 as a value. |
constraintstr or None, optional | Name of the CHECK constraint, when generated. |
| Returns | |
Boolean | Column definition ready for schema declarations. |
str, precision: int | None = None, *, asdecimal: bool = False, decimal_return_scale: int | None = None) -> Double:
(source)
¶
Build a DOUBLE column definition.
| Parameters | |
name:str | Name assigned to the column. |
precision:int or None, optional | Numeric precision for use in DDL CREATE TABLE. |
asdecimal:bool, optional | Whether values are coerced to decimal.Decimal. |
decimalint or None, optional | Default scale used when converting floats to decimals. |
| Returns | |
Double | Column definition ready for schema declarations. |
str, *enums: str, constraint_name: str | None = None, create_constraint: bool = False, native_enum: bool = True, length: int | None = None, validate_strings: bool = False) -> Enum:
(source)
¶
Build a string-backed enumeration column definition.
| Parameters | |
name:str | Name assigned to the column. |
*enums:str | Allowed string values, at least one is required. |
constraintstr or None, optional | Name of the enumerated database type. |
createbool, optional | When emulating a non-native enum, also build a CHECK constraint against the allowed values. |
nativebool, optional | Whether to use the backend's native ENUM type. |
length:int or None, optional | Custom VARCHAR length for non-native enumerations. |
validatebool, optional | Whether to validate string literals against allowed values. |
| Returns | |
Enum | Column definition ready for schema declarations. |
| Raises | |
ValueError | If no values are provided or any value is not a string. |
str, precision: int | None = None, *, asdecimal: bool = False, decimal_return_scale: int | None = None) -> Float:
(source)
¶
Build a FLOAT column definition.
| Parameters | |
name:str | Name assigned to the column. |
precision:int or None, optional | Numeric precision for use in DDL CREATE TABLE. |
asdecimal:bool, optional | Whether values are coerced to decimal.Decimal. |
decimalint or None, optional | Default scale used when converting floats to decimals. |
| Returns | |
Float | Column definition ready for schema declarations. |
Build a BIGINT primary key column definition.
| Parameters | |
name:str, optional | Name assigned to the column, defaults to "id". |
| Returns | |
BigInteger | Column definition ready for schema declarations. |
Build an INTEGER column definition.
| Parameters | |
name:str | Name assigned to the column. |
| Returns | |
Integer | Column definition ready for schema declarations. |
str, *, native: bool = True, second_precision: int | None = None, day_precision: int | None = None) -> Interval:
(source)
¶
Build an INTERVAL column definition.
| Parameters | |
name:str | Name assigned to the column. |
native:bool, optional | Whether to use the backend's native INTERVAL type, when supported (PostgreSQL, Oracle Database). |
secondint or None, optional | Fractional seconds precision for native interval types. |
dayint or None, optional | Day precision for native interval types. |
| Returns | |
Interval | Column definition ready for schema declarations. |
Build a large binary column definition.
| Parameters | |
name:str | Name assigned to the column. |
length:int or None, optional | Length for the column for use in DDL statements, for those binary types that accept a length. |
| Returns | |
LargeBinary | Column definition ready for schema declarations. |
| Raises | |
ValueError | If the length is not a positive integer or None. |
str, precision: int | None = None, scale: int | None = None, decimal_return_scale: int | None = None, *, asdecimal: bool = True) -> Numeric:
(source)
¶
Build a NUMERIC column definition.
| Parameters | |
name:str | Name assigned to the column. |
precision:int or None, optional | Numeric precision for use in DDL CREATE TABLE. |
scale:int or None, optional | Numeric scale for use in DDL CREATE TABLE. |
decimalint or None, optional | Default scale used when converting floats to decimals. |
asdecimal:bool, optional | Whether values are returned as decimal.Decimal objects. |
| Returns | |
Numeric | Column definition ready for schema declarations. |
| Raises | |
ValueError | If precision or scale are negative or inconsistent. |
Build a numeric-common placeholder column definition.
| Parameters | |
name:str | Name assigned to the column. |
| Returns | |
NumericCommon | Column definition ready for schema declarations. |
str, protocol: int = 5, pickler: object | None = None, impl: object | None = None) -> PickleType:
(source)
¶
Build a pickle-backed column definition.
| Parameters | |
name:str | Name assigned to the column. |
protocol:int, optional | Pickle protocol, defaults to pickle.HIGHEST_PROTOCOL. |
pickler:object or None, optional | Object exposing pickle-compatible dumps/loads methods. |
impl:object or None, optional | Binary-storing type used in place of the default LargeBinary. |
| Returns | |
PickleType | Column definition ready for schema declarations. |
Build a schema-level placeholder column definition.
| Parameters | |
name:str | Name assigned to the column. |
schemastr or None, optional | Name of the associated schema-level construct. |
| Returns | |
SchemaType | Column definition ready for schema declarations. |
Build a SMALLINT column definition.
| Parameters | |
name:str | Name assigned to the column. |
| Returns | |
SmallInteger | Column definition ready for schema declarations. |
str, item_type: ColumnDefinition, *, as_tuple: bool = False, dimensions: int | None = None, zero_indexes: bool = False) -> StrictArray:
(source)
¶
Build a SQL ARRAY column definition.
| Parameters | |
name:str | Name assigned to the column. |
itemColumnDefinition | Column definition of the array elements. |
asbool, optional | Whether results are converted to tuples instead of lists. |
dimensions:int or None, optional | Fixed number of dimensions, when not None. |
zerobool, optional | Whether to convert between zero- and one-based indexes. |
| Returns | |
StrictArray | Column definition ready for schema declarations. |
Build a SQL BIGINT column definition.
| Parameters | |
name:str | Name assigned to the column. |
| Returns | |
StrictBigInt | Column definition ready for schema declarations. |
Build a SQL BINARY column definition.
| Parameters | |
name:str | Name assigned to the column. |
length:int or None, optional | Length for the column for use in DDL statements. |
| Returns | |
StrictBinary | Column definition ready for schema declarations. |
Build a SQL BLOB column definition.
| Parameters | |
name:str | Name assigned to the column. |
length:int or None, optional | Length for the column for use in DDL statements. |
| Returns | |
StrictBlob | Column definition ready for schema declarations. |
str, length: int | None = None, collation: str | None = None) -> StrictChar:
(source)
¶
Build a SQL CHAR column definition.
| Parameters | |
name:str | Name assigned to the column. |
length:int or None, optional | Length for the column for use in DDL and CAST expressions. |
collation:str or None, optional | Column-level collation for use in DDL and CAST expressions. |
| Returns | |
StrictChar | Column definition ready for schema declarations. |
str, length: int | None = None, collation: str | None = None) -> StrictClob:
(source)
¶
Build an Oracle/Informix CLOB column definition.
| Parameters | |
name:str | Name assigned to the column. |
length:int or None, optional | Length for the column for use in DDL and CAST expressions. |
collation:str or None, optional | Column-level collation for use in DDL and CAST expressions. |
| Returns | |
StrictClob | Column definition ready for schema declarations. |
str, precision: int | None = 10, scale: int | None = 2, decimal_return_scale: int | None = None, *, asdecimal: bool = True) -> StrictDecimal:
(source)
¶
Build a SQL DECIMAL column definition.
| Parameters | |
name:str | Name assigned to the column. |
precision:int or None, optional | Numeric precision for use in DDL CREATE TABLE. |
scale:int or None, optional | Numeric scale for use in DDL CREATE TABLE. |
decimalint or None, optional | Default scale used when converting floats to decimals. |
asdecimal:bool, optional | Whether values are returned as decimal.Decimal objects. |
| Returns | |
StrictDecimal | Column definition ready for schema declarations. |
| Raises | |
ValueError | If precision or scale are negative or inconsistent. |
str, precision: int | None = None, *, asdecimal: bool = False, decimal_return_scale: int | None = None) -> StrictDoublePrecision:
(source)
¶
Build a SQL DOUBLE PRECISION column definition.
| Parameters | |
name:str | Name assigned to the column. |
precision:int or None, optional | Numeric precision for use in DDL CREATE TABLE. |
asdecimal:bool, optional | Whether values are coerced to decimal.Decimal. |
decimalint or None, optional | Default scale used when converting floats to decimals. |
| Returns | |
StrictDoublePrecision | Column definition ready for schema declarations. |
Build a SQL JSON column definition.
| Parameters | |
name:str | Name assigned to the column. |
nonebool, optional | When True, persist Python None as SQL NULL instead of the JSON encoding of null. |
| Returns | |
StrictJson | Column definition ready for schema declarations. |
str, length: int | None = None, collation: str | None = None) -> StrictNChar:
(source)
¶
Build a SQL NCHAR column definition.
| Parameters | |
name:str | Name assigned to the column. |
length:int or None, optional | Length for the column for use in DDL and CAST expressions. |
collation:str or None, optional | Column-level collation for use in DDL and CAST expressions. |
| Returns | |
StrictNChar | Column definition ready for schema declarations. |
str, length: int | None = None, collation: str | None = None) -> StrictNVarChar:
(source)
¶
Build a SQL NVARCHAR column definition.
| Parameters | |
name:str | Name assigned to the column. |
length:int or None, optional | Length for the column for use in DDL and CAST expressions. |
collation:str or None, optional | Column-level collation for use in DDL and CAST expressions. |
| Returns | |
StrictNVarChar | Column definition ready for schema declarations. |
str, precision: int | None = None, *, asdecimal: bool = False, decimal_return_scale: int | None = None) -> StrictReal:
(source)
¶
Build a SQL REAL column definition.
| Parameters | |
name:str | Name assigned to the column. |
precision:int or None, optional | Numeric precision for use in DDL CREATE TABLE. |
asdecimal:bool, optional | Whether values are coerced to decimal.Decimal. |
decimalint or None, optional | Default scale used when converting floats to decimals. |
| Returns | |
StrictReal | Column definition ready for schema declarations. |
Build a SQL SMALLINT column definition.
| Parameters | |
name:str | Name assigned to the column. |
| Returns | |
StrictSmallInt | Column definition ready for schema declarations. |
Build a SQL TIMESTAMP column definition.
| Parameters | |
name:str | Name assigned to the column. |
timezone:bool, optional | Whether the TIMESTAMP type should enable timezone support, if available on the target database. |
| Returns | |
StrictTimestamp | Column definition ready for schema declarations. |
Build a SQL VARBINARY column definition.
| Parameters | |
name:str | Name assigned to the column. |
length:int or None, optional | Length for the column for use in DDL statements. |
| Returns | |
StrictVarBinary | Column definition ready for schema declarations. |
str, length: int | None = 255, collation: str | None = None) -> StrictVarChar:
(source)
¶
Build a SQL VARCHAR column definition.
| Parameters | |
name:str | Name assigned to the column. |
length:int or None, optional | Length for the column for use in DDL and CAST expressions. |
collation:str or None, optional | Column-level collation for use in DDL and CAST expressions. |
| Returns | |
StrictVarChar | Column definition ready for schema declarations. |
Build a VARCHAR column definition.
| Parameters | |
name:str | Name assigned to the column. |
length:int or None, optional | Length for the column for use in DDL and CAST expressions. |
collation:str or None, optional | Column-level collation for use in DDL and CAST expressions. |
| Returns | |
String | Column definition ready for schema declarations. |
| Raises | |
ValueError | If the length is not a positive integer or None. |
Build a TEXT/CLOB column definition.
| Parameters | |
name:str | Name assigned to the column. |
length:int or None, optional | Length for the column for use in DDL and CAST expressions. |
collation:str or None, optional | Column-level collation for use in DDL and CAST expressions. |
| Returns | |
Text | Column definition ready for schema declarations. |
str, length: int | None = None, collation: str | None = None) -> Unicode:
(source)
¶
Build an NVARCHAR column definition.
| Parameters | |
name:str | Name assigned to the column. |
length:int or None, optional | Length for the column for use in DDL and CAST expressions. |
collation:str or None, optional | Column-level collation for use in DDL and CAST expressions. |
| Returns | |
Unicode | Column definition ready for schema declarations. |
str, length: int | None = None, collation: str | None = None) -> UnicodeText:
(source)
¶
Build an NCLOB/NTEXT column definition.
| Parameters | |
name:str | Name assigned to the column. |
length:int or None, optional | Length for the column for use in DDL and CAST expressions. |
collation:str or None, optional | Column-level collation for use in DDL and CAST expressions. |
| Returns | |
UnicodeText | Column definition ready for schema declarations. |