I have a table say CATEGORY, and one of its column is CATEGORY_NAME. I want to query all the category_names from the table.
In SQL I would do-
SELECT CATEGORY_NAME FROM CATEGORY;
How can I do this in flask-sqlalchemy?
My model is:
class Category(db.Model):
id = db.Column(db.Integer, primary_key=True)
category_name = db.Column(db.String(64), index=True, unique=True)
I read we can do this with with_entities, but it didn't work.