PgDB: add possibility to provide query parameters on doSelect()
This commit is contained in:
parent
6e778a8691
commit
21bd45ad25
1 changed files with 2 additions and 2 deletions
|
@ -84,11 +84,11 @@ class PgDB:
|
|||
self.con.rollback()
|
||||
return False
|
||||
|
||||
def doSelect(self, sql):
|
||||
def doSelect(self, sql, params):
|
||||
""" Run SELECT SQL query and return result as dict """
|
||||
cursor = self.con.cursor()
|
||||
try:
|
||||
cursor.execute(sql)
|
||||
cursor.execute(sql, params)
|
||||
results = cursor.fetchall()
|
||||
return results
|
||||
except Exception:
|
||||
|
|
Loading…
Reference in a new issue