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 StrictDecimal(ColumnDefinition): (source)
Constructor: StrictDecimal(precision, scale, decimal_return_scale, asdecimal)
The SQL DECIMAL type.
| Method | __init__ |
Construct a fixed-point decimal declaration. |
| Class Variable | __slots__ |
Declare that this class introduces no additional instance slots. |
def __init__(self, precision:
int | None = DEFAULT_DECIMAL_PRECISION, scale: int | None = DEFAULT_DECIMAL_SCALE, decimal_return_scale: int | None = None, *, asdecimal: bool = True):
(source)
¶
Construct a fixed-point decimal declaration.
| Parameters | |
precision:int or None, optional | Numeric precision for DDL. Supply it together with scale, or leave both values as None. |
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 | |
None | This method does not return a value. |
| Raises | |
ValueError | If the shape is incomplete, contains non-integers or booleans, or has non-positive precision or scale outside its range. |