On 2014/03/05 17:05, Chris wrote:
Ok, fair enough. I thought that in the same way that sqlite looks for
binary vs. string representations of referenced vars and has alternative
ways of specifying variable to bind to ('@', ':'), it might also spot a
list object and internally expand it to "elem_0,elem_1,elem_2". Would
that be a useful feature, or does it introduce opportunities to draw the
wrong conclusion?
Most high-level languages have some sort of list expansion in list objects
which obviates the need.
You should for instance be bale to say something like this in most languages:
mylist = New(List);
mylist.add("Item1");
mylist.add("Item2");
...
mylist.add("Item6");
mylist.add("Item7");
etc..
mylist.separator=","; // Comma
mylist.QuoteChar="'"; // Single Quote
So the entire Query bit can become something simple like:
qry = "SELECT a,b FROM t WHERE id IN ("+mylist.asString+");"
or something to that effect....
Adding any SQLite function to try and break down your sent variable into lists would probably pay a much higher price in processing
and added code - moreso than it really being difficult to do or in violation of some method or way of doing.
If those lists get really really long or convoluted, it is best to break them into tables of their own via some query and then use
the base query from that table as the list specifier.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users