Re: [sqlite] RTree and foreign keys

2017-04-25 Thread Richard Hipp
On 4/25/17, David Raymond  wrote:
>
> Are foreign keys at all possible with virtual tables like this?
>

Foreign key constraints are possible on virtual tables, but it is up
to the various virtual table implementations to implement them, and
R-Tree does not.
-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] RTree and foreign keys

2017-04-25 Thread David Raymond
Try as I might, I can't seem to get RTrees and foreign keys to play nicely with 
each other. With a little digging it looks like this is a general issue with 
the virtual nature of virtual tables in general.

Are foreign keys at all possible with virtual tables like this?

And if so, might it be a potential future enhancement for RTree to be able to 
specify that?

Something like

create table bulky_geometry_table(
uuid primary key,
indexID integer unique,
bulkyGeoData blob
);
create virtual table geo_index using rtree(
geo_id references bulky_geometry_table (indexID)
on delete cascade,
minLat, maxLat, minLon, maxLon
);

Or would that be considered not worth the effort?
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users