6 ms·
That could be nice, unless `find` is limited to equality relations with a constant. And all examples are equality relations with constants...
by masklinn 13y ago
That could be nice, unless `find` is limited to equality relations with a constant. And all examples are equality relations with constants...
- thruflo 13y agoLooking at the source[1] `find` supports `==` and `in_()`. Beyond that, it supports custom sql queries[2]. For more power, drop down to SQLAlchemy. [1]: https://github.com/pudo/dataset/blob/dc144a27b01ff404a5282758f010f00bad87cbe9/dataset/persistence/table.py#L200 https://github.com/pudo/dataset/blob/dc144a27b01ff404a528275... [2]: https://dataset.readthedocs.org/en/latest/quickstart.html#running-custom-sql-queries https://dataset.readthedocs.org/en/latest/quickstart.html#ru...
- masklinn 13y ago> Beyond that, it supports custom sql queries[2]. That's more than a bit unsatisfactory if I'm using a query builder or ORM to avoid writing custom SQL queries. > For more power, drop down to SQLAlchemy. It's closer to stepping sideways, even the expression language is at a similar level of abstraction.
- lucian1900 13y agoIt pretty much is SQLAlchemy. Look at the code, there's very little there.
- pudo 13y agoI'm looking for a nice syntax to implement the other filter types in Python that doesn't amount to rebuilding most of SQLAlchemy. Maybe it's just a question of exposing the existing API of SQLA better.