On 9/16/17, Jens Alfke <j...@mooseyard.com> wrote:
>
>
>> On Sep 15, 2017, at 11:40 PM, Wout Mertens <wout.mert...@gmail.com> wrote:
>>
>> This would be handy when specifying `INSERT INTO t(@?) VALUES(@?)` or
>> `SELECT
>> * FROM t WHERE v IN (@?)`.
>
> I'm definitely not an expert on the SQLite virtual machine, but I believe
> that changing these parameters [or at least the number of parameters] would
> alter the opcodes generated for the statement. Which would require
> recompiling the statement. So it wouldn't be feasible to make them bindings.
>

That is correct.

For the second case ("SELECT * FROM t WHERE v IN ?") you could use the
carray table-valued function (https://www.sqlite.org/carray.html).
But for the INSERT statement, a recompile would be necessary, making
that impractical to do with binding.

-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to