Preliminary SQLite database implementation

This commit is contained in:
Bradley committed 2025-10-11 22:48:31 -04:00
1 parent 336e38dc08
commit 97b97f9a38
2 files changed
+30 -2

No files matched your search

+5 -2
View File
@@ -2,10 +2,13 @@ class Database():
def __init__(self):
pass
def query(self, query: str, parameters: list=None) -> tuple[int, list[dict]]:
def close(self):
pass
def select(self, table: str, columns: list[str]=None, where: list[dict]=None) -> list[dict]:
def query(self, query: str, parameters: list=None) -> tuple[int, list[tuple]]:
pass
def select(self, table: str, columns: list[str]=None, where: list[dict]=None) -> list[tuple]:
query_string = "SELECT {columns} FROM {table}{where}".format(
columns = "*" if columns is None else ",".join(columns),
table = table,