From 352b8705e8b82b9413df7770176ec7d09212d30d Mon Sep 17 00:00:00 2001 From: "Michael F." Date: Tue, 17 Dec 2024 14:15:56 +0100 Subject: [PATCH] allow passing parameters to create engine --- src/tagstore/db/database.py | 8 ++++---- src/tagstore/db/queries.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tagstore/db/database.py b/src/tagstore/db/database.py index 768bdb7..be50e49 100644 --- a/src/tagstore/db/database.py +++ b/src/tagstore/db/database.py @@ -54,12 +54,12 @@ ] -def get_db_engine(db_url): - return create_engine(db_url, echo=False) +def get_db_engine(db_url, **kwargs): + return create_engine(db_url, **kwargs) -def get_db_engine_async(db_url): - return create_async_engine(db_url, echo=False) +def get_db_engine_async(db_url, **kwargs): + return create_async_engine(db_url, **kwargs) def get_table_ddl_sql(): diff --git a/src/tagstore/db/queries.py b/src/tagstore/db/queries.py index 707dcbc..d8c3dfa 100644 --- a/src/tagstore/db/queries.py +++ b/src/tagstore/db/queries.py @@ -484,7 +484,7 @@ def __init__(self, engine): self.engine = engine @staticmethod - def from_engine(db_url): + def from_url(db_url): return TagstoreDbAsync(get_db_engine_async(db_url)) # get Tag by id