acapy_agent.database_manager.databases.sqlite_normalized.handlers package
Module docstring.
Subpackages
- acapy_agent.database_manager.databases.sqlite_normalized.handlers.custom package
ConnectionMetadataCustomHandlerCredExV20CustomHandlerPresExV20CustomHandler- Submodules
- acapy_agent.database_manager.databases.sqlite_normalized.handlers.custom.connection_metadata_custom_handler module
- acapy_agent.database_manager.databases.sqlite_normalized.handlers.custom.cred_ex_v20_custom_handler module
- acapy_agent.database_manager.databases.sqlite_normalized.handlers.custom.pres_ex_v20_custom_handler module
Submodules
acapy_agent.database_manager.databases.sqlite_normalized.handlers.base_handler module
Module docstring.
- class acapy_agent.database_manager.databases.sqlite_normalized.handlers.base_handler.BaseHandler(category: str)[source]
Bases:
ABCAbstract base class for handlers managing CRUD/query operations for a category.
- abstractmethod count(cursor: Cursor, profile_id: int, category: str, tag_filter: str | dict) int[source]
Count the number of entries matching the specified criteria.
- abstractmethod fetch(cursor: Cursor, profile_id: int, category: str, name: str, tag_filter: str | dict, for_update: bool) Entry | None[source]
Fetch a single entry by its name.
- abstractmethod fetch_all(cursor: Cursor, profile_id: int, category: str, tag_filter: str | dict, limit: int, for_update: bool) Sequence[Entry][source]
Fetch all entries matching the specified criteria.
- abstractmethod get_sql_clause(tag_query: TagQuery) Tuple[str, List[Any]][source]
Translate a TagQuery into an SQL clause and corresponding parameters.
- abstractmethod insert(cursor: Cursor, profile_id: int, category: str, name: str, value: str | bytes, tags: dict, expiry_ms: int) None[source]
Insert a new entry into the database.
- abstractmethod remove(cursor: Cursor, profile_id: int, category: str, name: str) None[source]
Remove an entry identified by its name.
- abstractmethod remove_all(cursor: Cursor, profile_id: int, category: str, tag_filter: str | dict) int[source]
Remove all entries matching the specified criteria.
acapy_agent.database_manager.databases.sqlite_normalized.handlers.generic_handler module
Module docstring.
- class acapy_agent.database_manager.databases.sqlite_normalized.handlers.generic_handler.GenericHandler(category: str = 'default', tags_table_name: str | None = None)[source]
Bases:
BaseHandlerHandler for generic categories using items and a configurable tags table.
- ALLOWED_ORDER_BY_COLUMNS = {'id', 'name', 'value'}
- count(cursor: Cursor, profile_id: int, category: str, tag_filter: str | dict) int[source]
Count entries matching criteria in the database.
- fetch(cursor: Cursor, profile_id: int, category: str, name: str, tag_filter: str | dict, for_update: bool) Entry | None[source]
Fetch a single entry from the database.
- fetch_all(cursor: Cursor, profile_id: int, category: str, tag_filter: str | dict, limit: int, for_update: bool, order_by: str | None = None, descending: bool = False) Sequence[Entry][source]
Fetch all entries matching criteria from the database.
- get_sql_clause(tag_query: TagQuery) Tuple[str, List[Any]][source]
Translate a TagQuery into an SQL clause and corresponding parameters.
- insert(cursor: Cursor, profile_id: int, category: str, name: str, value: str | bytes, tags: dict, expiry_ms: int) None[source]
Insert an entry into the database.
- remove(cursor: Cursor, profile_id: int, category: str, name: str) None[source]
Remove a single entry from the database.
- remove_all(cursor: Cursor, profile_id: int, category: str, tag_filter: str | dict) int[source]
Remove all entries matching criteria from the database.
- replace(cursor: Cursor, profile_id: int, category: str, name: str, value: str | bytes, tags: dict, expiry_ms: int) None[source]
Replace an existing entry in the database.
acapy_agent.database_manager.databases.sqlite_normalized.handlers.normalized_handler module
Module docstring.
- class acapy_agent.database_manager.databases.sqlite_normalized.handlers.normalized_handler.NormalizedHandler(category: str, columns: List[str], table_name: str | None = None)[source]
Bases:
BaseHandlerHandler for normalized categories using specific tables.
- count(cursor: Cursor, profile_id: int, category: str, tag_filter: str | dict) int[source]
Count the number of entries matching the specified criteria.
- fetch(cursor: Cursor, profile_id: int, category: str, name: str, tag_filter: str | dict, for_update: bool) Entry | None[source]
Fetch a single entry by its name.
- fetch_all(cursor: Cursor, profile_id: int, category: str, tag_filter: str | dict, limit: int, for_update: bool, order_by: str | None = None, descending: bool = False) Sequence[Entry][source]
Fetch all entries matching the specified criteria with ordering.
- get_sql_clause(tag_query: TagQuery) Tuple[str, List[Any]][source]
Translate a TagQuery into an SQL clause for the normalized table.
- insert(cursor: Cursor, profile_id: int, category: str, name: str, value: str | bytes, tags: dict, expiry_ms: int) None[source]
Insert an entry into the database.
- remove(cursor: Cursor, profile_id: int, category: str, name: str) None[source]
Remove an entry identified by its name.
- remove_all(cursor: Cursor, profile_id: int, category: str, tag_filter: str | dict) int[source]
Remove all entries matching the specified criteria.
- replace(cursor: Cursor, profile_id: int, category: str, name: str, value: str | bytes, tags: dict, expiry_ms: int) None[source]
Replace an existing entry in the database.
- acapy_agent.database_manager.databases.sqlite_normalized.handlers.normalized_handler.deserialize_tags(tags: dict) dict[source]
Deserialize tags, converting JSON strings and handling booleans.