Create read/write functions to fill later
This commit is contained in:
parent
20648ed295
commit
997dc064e6
15
database.py
15
database.py
@ -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
|
Loading…
x
Reference in New Issue
Block a user