creating tables needed for a query on-demand

Ryan Blazecka <rblazecka-Y8iDqJfwfq2w5LPnMra/[email protected]>
Newsgroups gmane.comp.python.db.pysqlite.user
Message-ID <[email protected]>
hello all,

I'm wanting my application to be able to construct tables on-demand, 
based on the user's queries. so for example, if the user types:

SELECT * FROM foo;

when this statement gets evaluated, my application should then check to 
see if this table exists, and if not create & populate it, then execute 
the query. now, I could do this by parsing the query myself to extract 
any referenced table names, but this seems error-prone, and unnecessary 
as SQLite is already parsing it anyways.

I've tried using an authorizer to do this, but the authorizer never sees 
the requested table's name, and thus can't do anything about it (at 
least not that I can see).

I could not find anything in the archives about how to make this work. 
is this possible?

thanx,
ryan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.