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

Conflicting documents and code. #357

Closed caffeinism closed 3 years ago

caffeinism commented 3 years ago

The document says: https://github.com/pudo/dataset/blob/97d67e397df762ea5e00b096b9d252086c7ddc4b/docs/queries.rst#L4-L19 It seems that conditional statements can be expressed as strings of (column, operator, value).

But the code says: https://github.com/pudo/dataset/blob/97d67e397df762ea5e00b096b9d252086c7ddc4b/dataset/table.py#L416-L429 https://github.com/pudo/dataset/blob/97d67e397df762ea5e00b096b9d252086c7ddc4b/dataset/table.py#L614

So I think it will be correct to fix it like this.

_clauses = [self._generate_clause(*clause) for clause in _clauses]
args = self._args_to_clause(kwargs, clauses=_clauses)

Thanks for reading.