The xBestIndex function needs to call the sqlite_vtab_collation() function to 
query the collation name required for each constraint and return the 
appropriate index number.

Subs: yes, yes, see above


-----Ursprüngliche Nachricht-----
Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im 
Auftrag von Dominique Devienne
Gesendet: Donnerstag, 28. Juni 2018 11:00
An: General Discussion of SQLite Database <sqlite-users@mailinglists.sqlite.org>
Betreff: [EXTERNAL] [sqlite] order by column_name collate custom_collation, 
with virtual table index

From reading this list, I've learned that for an index to have a change to be 
used to consume an order by, the collation of the query and the index must 
match.

But in many instances, that index is one from a virtual table we implement.
So is there a way to tell SQLite that vindex is of a given custom collation, to 
open the possibility of the index being used?

FWIW, the collation is a "natural order" one, i.e. a1, a2, ..., a10, ..., a19, 
a20, ..., a100.
Right now the vindex is lexicographic, not "natural order", but of I can have 
SQLite use it somehow, I can easily change my vindex to  "natural order" too.

Subsidiary questions:
Can one have two indexes on the same column with different collations?
And thus have SQLite consider these alternate indexes depending on queries 
collations?
Which goes back to my question about how telling SQLite about a vindex's 
collation.

Thanks, --DD
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


___________________________________________
 Gunter Hick | Software Engineer | Scientific Games International GmbH | 
Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O) +43 
1 80100 - 0

May be privileged. May be confidential. Please delete if not the addressee.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to