On Thu, Jun 28, 2018 at 2:03 PM Richard Hipp <d...@sqlite.org> wrote:

> On 6/28/18, Dominique Devienne <ddevie...@gmail.com> wrote:
> > 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?
>
> The only way to avoid sorting the output of a virtual table is for the
> xBestIndex routine to set the sqlite3_index_info.orderByConsumed boolean.
>

My point is more than when doing so, i.e. setting  orderByConsumed to
1/true,
there's no way that I can see for the vtable to know the collation used by
the query,
to validate whether it matches the vindex's own ordering. Or am I missing
something?

sqlite3_vtab_collation that Gunther pointed me to, works for  aConstraint[]
only,
according to the doc, so there's no way to know the aOrderBy[]
collation(s). --DD
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to