silverstripe/sapphire — pull request #1012 by chillu (2012-12-11 00:59:29+00:00)
Title: API DB-specific comparisators in SearchFilter and DataList

New approach for #1011.

Too many edge cases to leave this up to datalists,
particularly now that we introduced enforced
case sensitivity/insensitivity in the ORM APIs.

Do you think we need to deprecate a protected SearchFilter->comparison() method?
Its kinda incompatible with what we're doing.

I've made the method abstract in the base Database class,
which means you'll need to use the latest master drivers from the repo.
Necessary evil, right?

I'm not 100% sure that the case IN-sensitivity ('nocase') is enforced correctly,
but the DataListTest UTs pass on the various drivers.
Will do a full run on all drivers tomorrow.

Postgres: https://gist.github.com/4254736
Sqlite3: https://gist.github.com/4254782
MSSQL: https://gist.github.com/4254787