[sqlite] API enhancement proposal

2007-06-26 Thread Ken
I'd like to propose the following simple piece of code be added to sqlite. I believe it has some benefits for those who've wrapped the sqlite api's keeping copies in memory of the sql statement being executed. Add an api call that will return the saved SQL if using sqlite3_prepare_v2 or

Re: [sqlite] API enhancement

2007-03-20 Thread John Stanton
Partitioning an API at the wrong level punishes users who have carefully structured interfaces by needlessly bloating their code. It is hard to have a "Lite" embedded application when code bloat swells the library routines. Ken wrote: It should save some time. How much is questionable.

Re: [sqlite] API enhancement

2007-03-20 Thread Ken
Denis, Thanks for the great explanation !!! Regards, Ken Dennis Cote <[EMAIL PROTECTED]> wrote: Ken wrote: > It should save some time. How much is questionable. > > Why would sqlite have to bind the Pointer bound variables? Isn't the strategy > of binding to associate a

Re: [sqlite] API enhancement

2007-03-20 Thread Dennis Cote
Ken wrote: It should save some time. How much is questionable. Why would sqlite have to bind the Pointer bound variables? Isn't the strategy of binding to associate a variable with a statment? Why should I have to continually re-associate the bindings with a statement thats allready been

Re: [sqlite] API enhancement

2007-03-19 Thread Ken
It should save some time. How much is questionable. Why would sqlite have to bind the Pointer bound variables? Isn't the strategy of binding to associate a variable with a statment? Why should I have to continually re-associate the bindings with a statement thats allready been prepared and

Re: [sqlite] API enhancement

2007-03-19 Thread drh
ken-33 <[EMAIL PROTECTED]> wrote: > Anyone thoughts? > I would rather not complicate the existing API unnecessarily by add bells and whistles that can be easily implemented using simple by wrappers. > > ken-33 wrote: > > > > Question for the list, > > > > I'd like to optimize my code,

Re: [sqlite] API enhancement

2007-03-19 Thread ken-33
Anyone thoughts? ken-33 wrote: > > Question for the list, > > I'd like to optimize my code, using the following pseudo code as an > example. > > === > int i = 0 ; > char str[20]; > > sqlite3_prepare_v2( "insert into t1 values (?,?)" ) >

Re: [sqlite] API enhancement

2007-03-19 Thread Scott Hess
I don't see how your modified version is any better than just putting the sqlite3_bind_int() inside the loop. You've superficially lifted some code out of the loop, but sqlite3_step() is going to have to go through and bind all of the "pointer bound" variables in your suggested API, so it won't

Re: [sqlite] API enhancement

2007-03-19 Thread Ken
Anyone Ken <[EMAIL PROTECTED]> wrote: Question for the list, I'd like to optimize my code, using the following pseudo code as an example. === int i = 0 ; char str[20]; sqlite3_prepare_v2( "insert into t1 values (?,?)" ) sqlite3_bind_int ( i )

[sqlite] API enhancement

2007-03-14 Thread Ken
Question for the list, I'd like to optimize my code, using the following pseudo code as an example. === int i = 0 ; char str[20]; sqlite3_prepare_v2( "insert into t1 values (?,?)" ) sqlite3_bind_int ( i ) sqlite3_bind_text(str) BEGIN TRANSACTION