[DB-SIG] How to know what to do with parameters...
jacobs at penguin.theopalgroup.com
Fri May 16 14:29:34 EDT 2003
On 16 May 2003, Anthony Tuininga wrote:
> I don't think Magnus is suggesting that the _dbapi_string() perform the
> conversion or that the _dbapi_value() method that I suggested would
> convert the string. That is still the domain of the DB API driver.
That is certainly how I read Magnus's idea.
> All that is needed is some way of defining the value that is to be bound
> to the database driver in a way that is understandable by the driver. So
> if I have an instance of type Money()
> _dbapi_type() -> returns NUMBER
> _dbapi_value() -> returns a Python string that can then be manipulated
> by the driver as needed
> Or is there something else that I am missing?
The _dbapi_type is fine, although it is of little use by itself. The
_dbapi_value is the part that I have deep misgivings about. Are we going to
define canonical string representations for every possible database type for
all possible backends as part of DB-API?
The OPAL Group - Enterprise Systems Architect
Voice: (216) 986-0710 x 19 E-mail: jacobs at theopalgroup.com
Fax: (216) 986-0714 WWW: http://www.theopalgroup.com
More information about the DB-SIG