emmett-framework / emmett

The web framework for inventors
BSD 3-Clause "New" or "Revised" License
1.06k stars 71 forks source link

Example of how to run query for JSON fields? #215

Closed gcmurphy closed 6 years ago

gcmurphy commented 6 years ago

I'm not sure if pydal exposes this functionality of databases but I'd be interested in an example (if it is possible) of how to query json fields.

Something along the lines of what exists for PonyORM.

gi0baro commented 6 years ago

Hi @gcmurphy, currently no, it's not supported unless implementing the operators on your own, an example is available at this gist.

This will definitely be available in next major version, thanks to ORM rewrite, but currently there's no ETA.

gcmurphy commented 6 years ago

Ok thanks. I should be able to work around this in the meantime anyway.