[DB-SIG] Re: Towards a single parameter style

Denis S. Otkidach ods@strana.ru
Mon, 3 Mar 2003 17:12:56 +0300 (MSK)


On 1 Mar 2003, Federico Di Gregorio wrote:

FDG> thank you very much for the explanation. i think (but is
FDG> just IMHO,
FDG> obviously) that you choosed a complicated and error prone
FDG> style (mixing
FDG> query and argument) and to avoid error you just made it
FDG> heavier
FDG> (mandatory Param()). i don't see any benefits over the
FDG> standard way of
FDG> binding variables.

You already must use explicit wrapping for parameters of type
Date, DateTime, Binary, so requirement to wrap all parameters
doesn't make it mach havier.  Inlined definition is much easier
to read and expressed this way can be applied to any database
(can be converted to any existing DB API parameters style).
There is _no_ standard way (I mean one working with all
databases) to bind parameters, so it's not an option.

-- 
Denis S. Otkidach
http://www.python.ru/      [ru]