On Thu, Sep 23, 2010 at 7:16 AM, Ben Harper <b...@imqs.co.za> wrote: > I have a virtual table implementation that implements the > xBestIndex/xFilter functions. > Problem: > A LIKE query (for eg. field LIKE "prefix%") gets sets to xBestIndex as a > GT/LT pair. > However, I can't tell from the sqlite3_index_info whether that GT/LT should > be NOCASE collation or BINARY collation. I want the default LIKE behaviour, > which is NOCASE, but I can't figure out where to glean this information from > inside xBestIndex. > > Am I missing something? >
LIKE will only get converted to a GT/LT pair if the collating sequence is NOCASE, or if you have specified PRAGMA case_sensitive_like=ON and the collating sequence is BINARY. So if you have a GT/LT pair in xBestIndex and you have not missed with case_sensitive_like, then you can be sure that the collating sequence is NOCASE. > > Thanks, > Ben > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users