[DB-SIG] Preparing statement API

Greg Stein gstein@lyra.org
Wed, 26 Jan 2000 18:24:28 -0800 (PST)


On Tue, 25 Jan 2000, M.-A. Lemburg wrote:
>...
> Not all that different and without the need to invent new
> APIs or objects... seriously, all these gimmicks can be done
> using abstraction layers on top of the existing DB API interface.

This was the specific intent behind the current design. An unsophisticated
provider (or database) need not worrying about caching, reuse,
preparation, or implementing additional methods. The provider can add the
reuse functionality and performance will increase.

On the other side, a client can code with the understanding that reuse can
occur, but it will continue to work for those providers that do not
provide the functionality. It also eliminates feature testing.

The design lowers the bar for providers, reduces the breadth of the
interface, yet provides a smooth upgrade path for more performance.

As with most of the design of DBAPI, it provides a simple/minimal
requirement on the provider implementor, a not-broad interface for the
client to worry about, and provides for more sophisticated layers of
functionality at the Python level.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/