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
Inspect user objects without opening a separate database engine.
| Method | __init__ |
Bind inspection to a named connection. |
| Async Method | _find |
Find a requested table with a filtered catalog query. |
| Async Method | _redshift |
Read Redshift columns and informational keys without querying indexes. |
| Async Method | _redshift |
Read visible local objects without treating materialized views as tables. |
| Async Method | _redshift |
Read native block sizes when the caller can access SVV_TABLE_INFO. |
| Method | _resolve |
Match catalog names according to the driver's identifier rules. |
| Async Method | _server |
Read server column, index and foreign-key metadata. |
| Async Method | _sqlite |
Read SQLite column, index and foreign-key metadata. |
| Async Method | connection |
Return server session count if the driver exposes it. |
| Async Method | database |
Return database size in bytes when available. |
| Async Method | list |
List PostgreSQL domains, which require DROP DOMAIN. |
| Async Method | list |
List materialized views outside system schemas. |
| Async Method | list |
List non-system tables visible on the selected database. |
| Async Method | list |
List user-defined types that may be removed by db:wipe. |
| Async Method | list |
List user views visible on the selected database. |
| Method | quote |
Quote a catalog identifier using the selected SQL dialect. |
| Async Method | row |
Count rows in a table returned by the catalog. |
| Async Method | table |
Describe a physical table, including columns, indexes and keys. |
| Async Method | table |
Return physical table size in bytes when exposed by the driver. |
| Async Method | table |
Read physical sizes for all catalog tables in one query. |
| Async Method | view |
Count ordinary and materialized views from native catalogs. |
| Class Variable | __slots__ |
Declare the instance attribute slots reserved by this class. |
| Instance Variable | config |
Validated configuration used to construct and operate the service. |
| Instance Variable | connection |
Configured connection used to store or dispatch the operation. |
| Instance Variable | driver |
Driver produced by resolve_driver. |
| Instance Variable | name |
Named connection, or the configured default. |
Bind inspection to a named connection.
| Parameters | |
manager:orionis.database.contracts.IConnectionManager | Manager that resolves database configurations and connections. |
name:str | None, optional | Named connection, or the configured default. |
| Returns | |
None | Store the configuration and selected connection. |
Find a requested table with a filtered catalog query.
| Parameters | |
name:str | Qualified or unqualified table name requested by the user. |
| Returns | |
str | None | Unambiguous catalog table name, if one exists. |
async def _redshiftObjects(self, kind:
str, *, name: str | None = None, count: bool = False) -> list[ dict[ str, Any]]:
(source)
¶
Read visible local objects without treating materialized views as tables.
| Parameters | |
kind:str | Native TABLE or VIEW catalog category. |
name:str | None, optional | Optional qualified or unqualified object name used for a filtered lookup. |
count:bool, optional | Return an aggregate rather than loading object names. |
| Returns | |
list[dict[str, typing.Any]] | Visible object names or one aggregate count. |
async def _redshiftSizeRows(self, name:
str | None = None, *, aggregate: bool = False) -> list[ dict[ str, Any]] | None:
(source)
¶
Read native block sizes when the caller can access SVV_TABLE_INFO.
| Parameters | |
name:str | None, optional | Qualified table name, or None for all visible local tables. |
aggregate:bool, optional | Sum allocated bytes instead of returning individual table sizes. |
| Returns | |
list[dict[str, typing.Any]] | None | Sizes in bytes, or None when optional metadata access is unavailable. |
Return server session count if the driver exposes it.
| Returns | |
int | None | Open server sessions, or None when unavailable. |
Return database size in bytes when available.
| Returns | |
int | None | Database size, or None when unavailable. |
Quote a catalog identifier using the selected SQL dialect.
| Parameters | |
name:str | Identifier returned by the database catalog. |
qualified:bool, optional | Whether to split a schema-qualified identifier. |
| Returns | |
str | Identifier escaped for use in a SQL statement. |
| Raises | |
ValueError | If an identifier or one of its components is empty. |
Describe a physical table, including columns, indexes and keys.
| Parameters | |
name:str | Table name provided to db:table. |
| Returns | |
dict[str, typing.Any] | Table metadata and statistics. |
| Raises | |
ValueError | If the selected table is absent from the catalog. |
Return physical table size in bytes when exposed by the driver.
| Parameters | |
name:str | Catalog table name to inspect. |
| Returns | |
int | None | Physical size, or None when unavailable. |