Awesome! Thanks, I forgot about using the temp. Database.

Andy

On Monday, July 20, 2015, Peter Aronson <pbaronson at att.net> wrote:

> Most types of virtual table can be created as temporary tables with no
> trouble by specifying the temp database when you create them.  IE:
> CREATE VIRTUAL TABLE temp.myrtree USING RTREE (id,minx,maxx);
> However, the virtual table method xDestroy does not get called for a
> virtual table in the temp database unless an explicit DROP TABLE statement
> is executed on it; simply exiting and allowing SQLite to clean up the temp
> database won't do it.  However, for many Virtual Tables, the xDestroy
> method and the xDisconnect methods are the same, and SQLite will call the
> xDisconnect method on a virtual table in the temp database before exiting.
> So, unless the virtual table has to clean up additional metadata or if it
> deletes or releases some external resources, it can probably be safely
> created in the temp database and cleaned up by SQLite on exit.  Of course,
> if you explicitly DROP it when you are done with it, the xDestroy methods
> will be called and all should be as normal.
> Peter
>
>
>      On Monday, July 20, 2015 3:34 PM, Andy Rahn <andy.rahn at gmail.com
> <javascript:;>> wrote:
>
>
>
>  I see there is no way to create a temporary virtual table.
>
> One idea I had was to create a second, in-memory db and attach that, then
> create the virtual table over there.
>
> Currently I have it working where as soon as I open the db, I use
> sqlite_master to find any left over virtual tables from before and drop
> them.
>
> Any other ideas?
>
>  - Andy
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org <javascript:;>
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
>
>
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org <javascript:;>
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>

Reply via email to