Re: [sqlite] binding multiple values in a query

2015-02-12 Thread Paul
I just want to inject my $.05. As for me, binding an array or table is very well aligns with a syntax of WITH clause. So example query might look like: WITH array(x) AS ?001 SELECT x FROM array Or WITH my_table(x, y, z) AS ?001 SELECT * FROM my_table

Re: [sqlite] binding multiple values in a query

2015-02-12 Thread Scott Robison
On Feb 12, 2015 1:26 AM, "Dominique Devienne" wrote: > > We fill the collection client-side, bind it, execute that 1 statement, and > get back many rows, all in a single round-trip to the server (thanks to > prefetching on the select side). Mind you, this is not nearly as

Re: [sqlite] binding multiple values in a query

2015-02-12 Thread Dominique Devienne
On Thu, Feb 12, 2015 at 2:04 AM, Richard Hipp wrote: > On 2/11/15, Igor Tandetnik wrote: > > On 2/11/2015 5:46 PM, Jono Poff wrote: > >> I wonder if anybody could give me a simple example in C to bind an array > >> of values to a prepared statement? > >>> >

Re: [sqlite] binding multiple values in a query

2015-02-11 Thread Richard Hipp
On 2/11/15, Igor Tandetnik wrote: > On 2/11/2015 5:46 PM, Jono Poff wrote: >> I wonder if anybody could give me a simple example in C to bind an array >> of values to a prepared statement? >>> > These approaches use stock capabilities of SQLite and don't require > heroic

Re: [sqlite] binding multiple values in a query

2015-02-11 Thread Igor Tandetnik
On 2/11/2015 5:46 PM, Jono Poff wrote: I wonder if anybody could give me a simple example in C to bind an array of values to a prepared statement? The effect I'm looking for is sqlite3_stmt* stmt = Compile(db, "select * in Things where thing1 in ( );");

Re: [sqlite] binding multiple values in a query

2015-02-11 Thread Jono Poff
Gr really? Thanks for the quick response tho! I'm already building it from source so I'll investigate! Cheers, Jono On 12/02/2015 11:53 a.m., Peter Aronson wrote: You can't do that in standard SQLite -- you can only bind single values. However, if you download the full source

Re: [sqlite] binding multiple values in a query

2015-02-11 Thread Peter Aronson
You can't do that in standard SQLite -- you can only bind single values. However, if you download the full source package (as opposed to the amalgamation) of SQLite, there are a pair of files under src, test_intarray.c and test_intarray.h, which implement a virtual table that would let you do

[sqlite] binding multiple values in a query

2015-02-11 Thread Jono Poff
Hi, I wonder if anybody could give me a simple example in C to bind an array of values to a prepared statement? The effect I'm looking for is sqlite3_stmt* stmt = Compile(db, "select * in Things where thing1 in ( );"); sqlite3_bind_???(stmt,0 ,); Cheers,