[DB-SIG] API suggestion: expose 'quote' method
Harald Meland
Harald.Meland at usit.uio.no
Wed Jun 4 01:45:01 EDT 2003
[Magnus Lyckå]
> Chris Cogdon wrote:
>>cur.execute ( "some SQL statement", parameters )
>>cur.execute ( db.quote ( "some SQL statement", parameters ) )
>>
>
> I don't think your example can work reliably for all platforms
> quite like that. But this might work:
>
> cur.execute( *db.quote( "some SQL statement", parameters) )
>
> Not that it would be of much use though...
[...]
> In other words, I would like such a quote function to return
> what it would actually send to the next step in the chain, be
> that ADO or the MySQL client libs. Either just a string, or a
> tuple containing a string and a converted parameter tuple---but
> I'm not sure it's a reasonable thing to ask for in all interfaces.
I don't get it; what kind of problem is such a "maybe-quote" function
intended to solve?
--
Harald
More information about the DB-SIG
mailing list