database.prepare now accepts connection
This commit is contained in:
parent
44ae963f69
commit
e744cba7c8
@ -30,10 +30,6 @@ def _create_index(con: mariadb.Connection) -> None:
|
||||
)
|
||||
|
||||
|
||||
def prepare(host: int, user: str, passwd: str, database: str) -> None:
|
||||
con: mariadb.Connection = mariadb.connect(
|
||||
host=host, user=user, password=passwd, database=database
|
||||
)
|
||||
def prepare(con: mariadb.Connection) -> None:
|
||||
_create_tables(con)
|
||||
_create_index(con)
|
||||
con.close()
|
||||
|
Reference in New Issue
Block a user