On 5/30/2012 4:21 PM, Charles Samuels wrote:
On Wednesday, May 30, 2012 1:10:17 e.h. Marc L. Allen wrote:
Wouldn't it be easier to construct a couple of different views and then
intelligently decide which view to use based on the user request?
If I could determine which tables the user were interested in and then shift
the view beneath the user without the user knowing, then that'd work.
How about this. You create two views, say V1 and V2, one with the join
and one without. Take user-provided query, replace all occurences of V1
with V2, and try to prepare the new query. If that succeeds, the new
query is syntactically well-formed and you can execute it. Otherwise,
fall back to running the original query.
--
Igor Tandetnik
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users