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
Think there is a typo in davidism's answer, this works for me:
exists = db.session.query(**User**).filter_by(name='davidism').scalar() is not None