Still late to the party - another one bullet point item... On 7/4/05, Darren Duncan <[EMAIL PROTECTED]> wrote:
> 4. All host parameters should be named (like ":foo") rather than > positional (like "?"), meeting with the SQL:2003 standard. The named > format is a lot easier to use and flexible, making programmers a lot > less error prone, more powerful, and particularly more resource > efficient when the same parameter is conceptually used multiple times > in a SQL statement (it only has to be bound once). If anyone wants > to use positional format, it could easily be emulated on top of this. > Or, if native positional support is still important, then it should > be a parallel option that can be used at the same time as named in > any particular SQL statement. See the native API of SQLite 3 for one > example that (I believe) supports both in parallel. This also means > that execute() et al should take arguments in a hash rather than an > array. > Can you explain which parts of the SQL:2003 mandate this notation? I've had a moderately good poke around my copy of ISO/IEC 9075-2:2003 (SQL/Foundation) and cannot find this. I'd like a few section numbers listed which describe this. The various places I've looked include: 19.6 (prepare statement), 9 (Additional Common Rules), 6.4 (<value specification> and <target specification>). I could have missed something in these places - or I could be looking in the wrong place. The IDS (IBM Informix Dynamic SQL) syntax has a number of places where :<digits> can appear with a meaning other than placeholder, and there are also a number of places where :<identifier> can appear with a meaning other than placeholder. So, it would be extremely difficult to add :<identifier> notation into IDS. (One of the bits I had to remove from DBD::Informix was code from DBD::Oracle that simulated :<identifier> notation - because it breaks too much else.) This ties in with my previous comment, too; don't try to demand too much of the drivers, or the driver writers. As long as you've got a good surrogate system in DBI that can simulate those accurately for DBMS that only support '?' (positional) placeholders, then DBI v2 can do what the heck it likes. But as soon as it is inaccurate - translates things that should not be translated - or cannot do the translation automatically, then you will lose drivers (or, more accurately, driver writers). I'm all in favour of looking at the big picture and trying to see where you want to go. However, you must also keep an eye out for the marshes between where you are and where you want to go; don't let DBI be sunk by ignoring the realities of the available DBMS. -- Jonathan Leffler <[EMAIL PROTECTED]> #include <disclaimer.h> Guardian of DBD::Informix - v2005.01 - http://dbi.perl.org "I don't suffer from insanity - I enjoy every minute of it."