You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
import sqlite3
|
|
|
|
|
|
def get_masterdata(db: str, table: str, columns: list[str]) -> list[tuple]:
|
|
con = sqlite3.connect(f"./assets/masterdata/{db}")
|
|
cur = con.cursor()
|
|
query = f"select {','.join(columns)} from {table}"
|
|
res = cur.execute(query).fetchall()
|
|
con.close()
|
|
return res |