pudo / dataset

Easy-to-use data handling for SQL data stores with support for implicit table creation, bulk loading, and transactions.
https://dataset.readthedocs.org/
MIT License
4.76k stars 297 forks source link

enable dunder operators for filters (column__<op>=<value>) #396

Open miraculixx opened 2 years ago

miraculixx commented 2 years ago

This allows to specify multiple filters for the same column.

General syntax

Updates table.find(*_clauses, **kwargs) such that kwargs can be specified as { 'column__<op>': value }

Example

# height >= 20 AND height <= 50
table.find({'height__gte': 20, 'height__lte: 50'}

Relates to

213