According to the documentation, a search query should look like:
GET /api/person?q={"filters":[{"name":"age","op":"ge","val":10}]}
How do I compare a date? I tried:
GET /api/person?q={"filters":[{"name":"date","op":"<=","val":"1/20/2015"}]}
That gets no results, even though there are some which have dates prior to 1/20/2015. I tried:
GET /api/person?q={"filters":[{"name":"date","op":">=","val":"1/20/2015"}]}
That gets all results back, even ones that are from before 1/20/2015.
This is the User model:
class User(db.Model, UserMixin):
id = db.Column(db.Integer, primary_key=True)
date = db.Column(db.DateTime)
type =db.Column(db.String(255))
email = db.Column(db.String(255), unique=True)
password = db.Column(db.String(255))
active= db.Column(db.Boolean())
activated_at = db.Column(db.DateTime())
roles = db.relationship('Role', secondary=roles_users,
backref=db.backref('users', lazy='dynamic'))
What is the correct way to query a date?