database.prepare now accepts connection

This commit is contained in:
StNicolay 2022-10-05 15:10:10 +03:00
parent 44ae963f69
commit e744cba7c8

View File

@ -30,10 +30,6 @@ def _create_index(con: mariadb.Connection) -> None:
) )
def prepare(host: int, user: str, passwd: str, database: str) -> None: def prepare(con: mariadb.Connection) -> None:
con: mariadb.Connection = mariadb.connect(
host=host, user=user, password=passwd, database=database
)
_create_tables(con) _create_tables(con)
_create_index(con) _create_index(con)
con.close()