1
This commit is contained in:
@@ -58,10 +58,11 @@ class DatabaseConnection:
|
||||
c.execute(sql, args)
|
||||
return c.fetchall()
|
||||
|
||||
def execute(self, sql: str, args=None):
|
||||
"""Execute a SQL statement without returning rows."""
|
||||
def execute(self, sql: str, args=None) -> int:
|
||||
"""Execute a SQL statement without returning rows. Returns rowcount."""
|
||||
with self.conn.cursor() as c:
|
||||
c.execute(sql, args)
|
||||
return c.rowcount
|
||||
|
||||
def commit(self):
|
||||
"""Commit current transaction."""
|
||||
|
||||
Reference in New Issue
Block a user