Skip to content

Commit

Permalink
allow passing parameters to create engine
Browse files Browse the repository at this point in the history
  • Loading branch information
soad003 committed Dec 17, 2024
1 parent 8c0fc09 commit 352b870
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/tagstore/db/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
2 changes: 1 addition & 1 deletion src/tagstore/db/queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 352b870

Please sign in to comment.