capsul-flask/capsulflask/model.py
2020-05-09 20:36:14 -05:00

10 lines
282 B
Python

class Model:
def __init__(self, connection, cursor):
self.connection = connection
self.cursor = cursor
def emailExists(self, email):
self.cursor.execute("SELECT * FROM accounts WHERE email = %(email)s", {"email": email})
return len(self.cursor.fetchall()) > 0