-
Notifications
You must be signed in to change notification settings - Fork 0
vtf txb _buffercomponents _sql
The module contains helpers and advanced features in SQLite handling.
DATABASE_FILES_ERROR_SUIT: _DBInitSuit = _DBInitSuit()
This context manager is used when checking whether the database file already exists.
DATABASE_TABLE_ERROR_SUIT: _DBInitSuit = _DBInitSuit()
This context manager is used when creating the database tables.
_sql.path_from_uri(uri) -> tuple[str, bool] | None ¶
Parse the file path from a uri or return
Noneif the input is not a uri.
- Return a positive value as a tuple:
(<the file path | memory database name>, <whether memory mode is used>)
class _sql._DBInitSuit(ContextManager) ¶
A contextmanager/suit that is applied when a database is created.
Allows to handle or ignore database errors during creation.
For example, if a database is passed during parameterization whose files and tables already exist, this will normally cause an error. If these errors are to be avoided and the database is to be accepted nevertheless, the method
do_ignorecan be executed over the global constantsDATABASE_FILES_ERROR_SUITandDATABASE_TABLE_ERROR_SUITof the module beforehand.do_ignore() -> None ¶
Enable ignoring of all errors.do_raise() -> None ¶
Enable the raising of errors.set_handler(handler) -> None ¶
Set a custom handler for exiting.
This function is executed within the __exit__ method and receives the same parameters, the return value is also returned by
__exit__.
class _sql.SQLTSCursor(Cursor) ¶
A thread-safe SQLite Cursor object.
Used inside the buffer components _LocalHistory and _Swap as the database cursor, since the property
check_same_threadis disabled in the SQLite Connection's.Contains a RLock which is used inside the
execute*methods.__lock__: RLock
| Date: | 20 Dec 2022 |
|---|---|
| Version: | 0.1 |
| Author: | Adrian Hoefflin [srccircumflex] |
| Doc-Generator: | "pyiStructure-RSTGenerator" <prototype> |
