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

[QUESTION] How do I make a simple find query ignoring character case? #349

Closed DataGreed closed 3 years ago

DataGreed commented 3 years ago

I want to find a record in the database by a string ignoring it's character case, how do I do that?

pudo commented 3 years ago

You can do:

tbl = ds['my_table']
rows = tbl.find(('field', 'ilike', 'text'))

This might not be the fastest thing in the world, but it'll do the trick.

DataGreed commented 3 years ago

@pudo thank you so much!