I have a Flask application which uses Flask-SQLAlchemy to connect to a MySQL database.
I would like to be able to check whether a row is present in a table. How woul
bool(User.query.filter_by(name='John Smith').first())
It will return False if objects with this name doesn't exist and True if it exists.
False
True