A SQL Alchemy based implementation of the record manager.
SQLRecordManager(
self,
namespace: str,
*,
engine: Optional[Union[Engine, AsyncEngine]] = None,
db_url: Union[None, str, URL] = None,
engine_kwargs: Optional[Dict[str, Any]] = None,
async_mode: bool = False
)| Name | Type | Description |
|---|---|---|
namespace* | str | The namespace associated with this record manager. |
engine | Optional[Union[Engine, AsyncEngine]] | Default: NoneAn already existing SQL Alchemy engine. Default is None. |
db_url | Union[None, str, URL] | Default: NoneA database connection string used to create an SQL Alchemy engine. Default is None. |
engine_kwargs | Optional[Dict[str, Any]] | Default: NoneAdditional keyword arguments to be passed when creating the engine. Default is an empty dictionary. |
async_mode | bool | Default: FalseWhether to create an async engine. Driver should support async operations. It only applies if db_url is provided. Default is False. |
Create the database schema.
Create the database schema.
Get the current server time as a timestamp.
Please note it's critical that time is obtained from the server since we want a monotonic clock.
Get the current server time as a timestamp.
Please note it's critical that time is obtained from the server since we want a monotonic clock.
Upsert records into the SQLite database.
Upsert records into the SQLite database.
Check if the given keys exist in the SQLite database.
Check if the given keys exist in the SQLite database.
List records in the SQLite database based on the provided date range.
List records in the SQLite database based on the provided date range.
Delete records from the SQLite database.
Delete records from the SQLite database.