[odb-users] Creating virtual tables

Boris Kolpackov boris at codesynthesis.com
Wed Mar 1 06:47:57 EST 2023


Irvin Josue Hernandez Rivera <iherna31 at asu.edu> writes:

> The underlying DB I am using is Sqlite DB and I am using this db to store
> user positions as a Lat Lon. I wanted to add support to the DB for ranged
> queries an rtree https://www.sqlite.org/rtree.html
> In order for sqlite to create the rtree module the table instantiation need
> to be as follows:
> 
> CREATE VIRTUAL TABLE *<name>* USING rtree(*<column-names>*);
>
> I don't think the options pragma allows for this type of table creation

Right, AFAICS, this is an ad hoc statement that doesn't follow the
standard CREATE TABLE syntax:

https://www.sqlite.org/lang_createtable.html

I think your best bet is to create it manually by executing the
necessary statement directly.



More information about the odb-users mailing list