forked from 3wordchant/capsul-flask
add sql cli and explain it in the readme
This commit is contained in:
@ -146,12 +146,12 @@ class DBModel:
|
||||
|
||||
def list_payments_for_account(self, email):
|
||||
self.cursor.execute("""
|
||||
SELECT dollars, invalidated, created
|
||||
SELECT id, dollars, invalidated, created
|
||||
FROM payments WHERE payments.email = %s""",
|
||||
(email, )
|
||||
)
|
||||
return list(map(
|
||||
lambda x: dict(dollars=x[0], invalidated=x[1], created=x[2]),
|
||||
lambda x: dict(id=x[0], dollars=x[1], invalidated=x[2], created=x[3]),
|
||||
self.cursor.fetchall()
|
||||
))
|
||||
|
||||
|
Reference in New Issue
Block a user