On Fri, Apr 21, 2006 at 01:01:51AM +0400, Oleg Broytmann wrote:
> On Thu, Apr 20, 2006 at 02:39:48PM -0600, Gabe Rudy wrote:
> > connection.sqlrepr(Select(...)) is preferred over str(Select(...)) then is
> > it?
>
> str(Select()) can raise an exception because str() doesn't pass a
> database name to __sqlrepr__() internal methods. connection.sqlrepr()
> passes it correctly.
More on this. The database name is required to generate different SQL
representations for diferent backends. For example, different DBMSs have
different quotation rules - some quote with double quotes, some with
backslashed quotes: 'Ain''t that lovely?' vs 'Ain\'t that lovely?'
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED]
Programmers don't die, they just GOSUB without RETURN.
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss