Create read/write functions to fill later

This commit is contained in:
Camryn Thomas 2024-01-09 14:57:42 -06:00
parent 20648ed295
commit 997dc064e6
Signed by: cptlobster
GPG Key ID: 6D341D688163A176

View File

@ -24,4 +24,17 @@ class DBConnector:
self.conn.close()
def _query(self, sql):
self.cur.execute(sql)
self.cur.execute(sql)
def read(self, **kwargs):
"""Read rows from a database that match the specified filters.
:param kwargs: Column constraints; i.e. what value to filter by in what column.
:returns: A list of dictionaries of all matching rows, or an empty list if no match."""
pass
def write(self, **kwargs):
"""Write a row to the database.
:param kwargs: Values to write for each database; specify each column separately!"""
pass