On Tue, Oct 29, 2013 at 2:06 AM, Olaf Schmidt <n...@vbrichclient.com> wrote:

> Am 16.10.2013 10:40, schrieb Dominique Devienne:
> If I somehow missed a better work-around to this lack of array-binding, I'm
>
>> also interested of course, but obviously I'd prefer real array binding.
>>
>
> Maybe I'm missing something - but if I'd have a lot of "InApp-
> MemAllocations" in the form of different kinds (or "types")
> of lists, constantly changing their content as well as their
> listcount - but not their "type" - then I'd use a simple set
> of userdefined functions (not sure though, how "trigger-happy"
> those are with regards to your hooking-worries, when you add
> them into the engine - but this needs to happen only once,
> at startup).
>
> So, after those functions are in place - where's the problem with:
>
> select * from table where InMySmallUnsortedArrayExists(**some_column)
> select * from table where InMyLargerSortedArrayExists(**some_column)
> select * from table where InMyHashListExists(some_**column)
> ...
> etc. for trees or whatever you want to use to speed-up the exists-check.
>
> Or more generically with an additional Param:
> select * from table where InList(@ListTypeEnmValue, some_column)


First off, when you use functions like this, you basically rule out index
use, even if some_column is indexed. That's not good. << WHERE col IN list
>> OTOH, might use an index.

Second, as I mentioned, it's the UI that's SQL-driven. You can have N lists
or tables or combos in various dialogs, all looking at the same underlying
(virtual) table but each will have its own selection, so it's N different
lists that need to be used, where N is not fixed (some dialogs can be
popped up several times too, different instances of the *same* dialog). So
creating a function or a temp table for each just isn't great either, and
forces to name what is inherently "anonymous" IMHO. --DD
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to