app.enricher.db_enricher
Common baseclass for all enricher strategies that access a database.
Module Contents
- class app.enricher.db_enricher.DataBaseEnricherStrategy(engine: sqlalchemy.ext.asyncio.AsyncEngine)
Baseclass for all database enrichers.
- Parameters:
engine (sqlalchemy.ext.asyncio.AsyncEngine)
- async insert_enrichment(node: app.model.CompileRequest.Node, implementation: str, requested_inputs: dict[int, app.model.data_types.LeqoSupportedType], meta_data: app.model.CompileRequest.SingleInsertMetaData, session: sqlalchemy.ext.asyncio.AsyncSession | None = None) bool
Insert an enrichment
ImplementationNode
for a givenNode
.- Parameters:
node (app.model.CompileRequest.Node) – The node to insert the enrichment for.
implementation (str) – The implementation to insert
requested_inputs (dict[int, app.model.data_types.LeqoSupportedType]) – The (parsed) requested inputs for that node.
meta_data (app.model.CompileRequest.SingleInsertMetaData) – meta data for that node
session (sqlalchemy.ext.asyncio.AsyncSession | None) – The optional database session to use
- Returns:
Whether the insert was successful.
- Return type: