Re: [sqlite] host parameters / bind variables - further workouts

2004-08-27 Thread Doug Currie
Earlier I said (to Dennis and the list): > I still have trouble running the tests (error 128 from msys at odd > times that may be tcl subst related) but at least you can build > testfixture and run some tests. I have also reported privately to DRH a problem running tests bigrow-2.2 & bigrow-2.3

Re: [sqlite] host parameters / bind variables - further workouts

2004-08-27 Thread D. Richard Hipp
Doug Currie wrote: Friday, August 27, 2004, 10:47:30 AM, Dennis wrote: [...] Next I have to resolve the issue reported on ticket #871, since I'm building under Windows with MinGW. Right now I can't run the test suite. There is a simple workaround; at the end of src/test1.c use #if

Re: [sqlite] host parameters / bind variables - further workouts

2004-08-27 Thread Dennis Cote
From: Michael Roth <[EMAIL PROTECTED]> D. Richard Hipp wrote: | The ":N:" style variables were implemented briefly, but never in a | released version. The latest in CVS supports ":AAA" (alphanumeric AAA | with no closing colon) because that is what (I am told) is the | SQL standard. And what's

Re: [sqlite] host parameters / bind variables - further workouts

2004-08-27 Thread Michael Roth
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 D. Richard Hipp wrote: | The ":N:" style variables were implemented briefly, but never in a | released version. The latest in CVS supports ":AAA" (alphanumeric AAA | with no closing colon) because that is what (I am told) is the | SQL standard. And

Re: [sqlite] host parameters / bind variables - further workouts

2004-08-27 Thread Matt Sergeant
On 26 Aug 2004, at 19:15, Darren Duncan wrote: At 2:39 PM +0100 8/26/04, Matt Sergeant wrote: I already support sqlite3's numeric placeholders via the standard DBI API. Switching to non-numeric placeholders will be more complex (I'll have to use a hash instead of an array to store the

Re: [sqlite] host parameters / bind variables - further workouts

2004-08-26 Thread Darren Duncan
At 2:03 PM -0600 8/26/04, Dennis Cote wrote: Multiple use, single bind named parameters are the preferred way to go. You even say they are "ideal". The implementation cost of this is a trivially more complex than straight positional parameters. A simple loop calling strcmp() to match the parameter

Re: [sqlite] host parameters / bind variables - further workouts

2004-08-26 Thread Tiago Dionizio
Michael Roth wrote: I create a prepared statement with this: local db = sqlite3.open("somefilename") local stmt_a = db:prepare("SELECT * FROM test WHERE id=?1") local stmt_b = db:prepare("XYZ ?1 XYZ ?2 XYZ ?1") local id = 123 local str = "Hello World" stmt_a:bind(id)

Re: [sqlite] host parameters / bind variables - further workouts

2004-08-26 Thread Dennis Cote
Darren Duncan wrote: > In answer to both Michael Roth and Dennis Cote, I will try to explain > the logic in what D. Richard Hipp presented as the way things > currently are, as I understand the explanation. > > I interpret what DRH said in that SQLite 3 is still using plain > vanilla positional

Re: [sqlite] host parameters / bind variables - further workouts

2004-08-26 Thread Michael Roth
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Darren Duncan wrote: | Each instance of the various formats he allows in SQL like ?|:|$ etc are | just alternative format markings for a sequential placeholder/wildcard, | and each location in a SQL string is given a unique sequential number in | 1..N

Re: [sqlite] host parameters / bind variables - further workouts

2004-08-26 Thread Darren Duncan
At 2:39 PM +0100 8/26/04, Matt Sergeant wrote: I already support sqlite3's numeric placeholders via the standard DBI API. Switching to non-numeric placeholders will be more complex (I'll have to use a hash instead of an array to store the placeholders) but quite doable. In case I was giving off

Re: [sqlite] host parameters / bind variables - further workouts

2004-08-26 Thread Dennis Cote
D. Richard Hipp wrote: > Parameters can be in any of three forms: > > * > * > * I repeat the other calls for continued (or added) support of the ?n style of numbered parameters. They can of course be replaced by named parameters using names like :Pn but that involves extra

Re: [sqlite] host parameters / bind variables - further workouts

2004-08-26 Thread Michael Roth
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 D. Richard Hipp wrote: | Parameters can be in any of three forms: | | * | * | * | | Each parameter is assigned a number. Numbers are sequential from left | to right and begin with 1. The parameter number is used to bind values | to

Re: [sqlite] host parameters / bind variables - further workouts

2004-08-25 Thread Matt Wilson
On Wed, Aug 25, 2004 at 09:46:38PM -0700, Darren Duncan wrote: > > While I see this issue now closed, following Richard's explanation of > how things actually are working now, I'm curious as to where in the > SQL:2003 standard it mentions positional host parameters and '?'; > please give a

Re: [sqlite] host parameters / bind variables - further workouts

2004-08-25 Thread Darren Duncan
At 11:29 PM -0400 8/25/04, Matt Wilson wrote: Not only backwards compatibility, but standards compliance as well. While I see this issue now closed, following Richard's explanation of how things actually are working now, I'm curious as to where in the SQL:2003 standard it mentions positional

Re: [sqlite] host parameters / bind variables - further workouts

2004-08-25 Thread Matt Wilson
On Wed, Aug 25, 2004 at 06:22:26PM -0700, Darren Duncan wrote: > > For "backwards compatability", any plain '?' could still be allowed, > and be mixed with both other usages, and each '?' occurance would > implicitly be the same as ?1, ?2, etc. Not only backwards compatibility, but standards

Re: [sqlite] host parameters / bind variables - further workouts

2004-08-25 Thread Darren Duncan
At 9:34 PM -0400 8/25/04, D. Richard Hipp wrote: Parameters can be in any of three forms: * * * Each parameter is assigned a number. Numbers are sequential from left to right and begin with 1. The parameter number is used to bind values to the parameter. All parameters get a

Re: [sqlite] host parameters / bind variables - further workouts

2004-08-25 Thread Darren Duncan
At 6:31 PM -0600 8/25/04, Dennis Cote wrote: The application should not be setting the mapping between the parameter names and their index numbers. This should be done automatically by SQLite as it parses the SQL statement. As each named parameter is encountered SQLite should scan the parameter

[sqlite] host parameters / bind variables - further workouts

2004-08-25 Thread Darren Duncan
I have some further suggestions to workout regarding host parameters / bind variables, sort of bringing things together as it were, so they can be addressed during the current SQLite 3 beta phase. Note that I don't have any current SQLite 3 code in front of me, so the following is more a