[DB-SIG] API suggestion: expose 'quote' method

Greg Ewing greg at cosc.canterbury.ac.nz
Fri Jun 6 13:00:25 EDT 2003


Chris Cogdon <chris at cogdon.org>:

> I know that the postgresql and mysql drivers gleen the datatype 
> information only from the data being passed as parameters. Do any other 
> drivers get this from other places, such as the sql or from information 
> back from the database ?

Yes. I'm working with the Firebird (formerly Interbase) API at the
moment, and it does exactly this. You give it an SQL query containing
'?' markers, and it parses and fully groks it, consults the database
metadata, and gives you back a structure describing the expected types
of all the parameters.

It would be utterly impossible to get it to do this with anything less
than a fully-formed syntactically and semantically correct SQL
statement.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg at cosc.canterbury.ac.nz	   +--------------------------------------+



More information about the DB-SIG mailing list