sdispater / orator

The Orator ORM provides a simple yet beautiful ActiveRecord implementation.
https://orator-orm.com
MIT License
1.43k stars 174 forks source link

about case insensitive #114

Open pc10201 opened 7 years ago

pc10201 commented 7 years ago

How to query with case insensitive or case sensitive?

like django _icontains or _ieiexact

sdispater commented 7 years ago

For now, there is no database independent way of doing that since it will depend on the RDBMS you're using:

Postgres

It's case-sensitive by default.

Django notation Orator operator
icontains ILIKE '%value%'
iexact = value 

MySQL

Case insensitive by default.

Django notation Orator operator
icontains LIKE '%value%'
iexact = value

SQLite

Django notation Orator operator
icontains LIKE '%value%'
iexact LIKE value