It is the obvious way to do it. I would suspect that the OpenACS team decided to mimic Oracle behavior simply to lower the amount of re- writing of existing queries to be done. Which is perfectly valid for their goal and how I would likely have done it. However, to implement this in ns_db, there is no good reason to make it work the same way as Oracle does unless it is decided we want it to work the same for every database and this is the chosen syntax.

Bas.

On 17/04/2008, at 12:32 PM, Brett Schwarz wrote:
This is how pgtcl actually does bind variables...

----- Original Message ----
From: Bas Scheffers <[EMAIL PROTECTED]>
To: AOLSERVER@LISTSERV.AOL.COM
Sent: Wednesday, April 16, 2008 4:20:46 PM
Subject: Re: [AOLSERVER] aolserver and Pgtcl

On 17/04/2008, at 8:14 AM, Dossy Shiobara wrote:
I have wanted to add bind variable support to nsdb for a _long_ time,
but never got around to computing this support matrix that I describe
above.
I don't really like bind variables, I would much rather see it
implemented like:

ns_db select $db "select * from people where country = $1 and age >
$2" [list "au" 25]

The api could even fall back to emulating this when the database
itself does not support it.

This would be in a database independent way, instead of the current
way with Postgres and Oracle implementing their own commands.

Bas.


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED] > with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.





____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED] > with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to