|
From: Sidnei da S. <si...@re...> - 2003-07-04 16:20:05
|
Howdy,
Im working on integrating SQLObject and Zope3, and I must say that
SQLObject is wonderful. So far, I had to change only one line, and I
already have a working app. Here's my patch.
Index: SQLObject/SQLBuilder.py
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/SQLObject/SQLBuilder.py,v
retrieving revision 1.6
diff -u -r1.6 SQLBuilder.py
--- SQLObject/SQLBuilder.py 26 Jun 2003 08:33:56 -0000 1.6
+++ SQLObject/SQLBuilder.py 4 Jul 2003 16:13:50 -0000
@@ -108,7 +108,7 @@
t = type(obj)
if isinstance(obj, SQLExpression):
return obj.sqlRepr()
- elif t is type(""):
+ elif t is type("") or t is type (u""):
for orig, repl in sqlStringReplace:
obj = obj.replace(orig, repl)
return "'%s'" % obj
However, Im doing something not that clean which is 'registering' a
connection with DBConnection._connections by assigning directly to the
module variable. I would like to see a method to do that (eg:
DBConnection.registerConnection(name)), so that if it changes in the
future, any code depending on it doesnt break :)
Thanks for the work so far, and I hope to be able to make more
contributions soon. Just for the records, im working on a Sybase-based
app, but Im still prototyping, so Im using MySQL currently. Of course
when the time comes, I will need to write a SybaseConnection class and
I would like to contribute it back to the codebase.
[]'s
--
Sidnei da Silva (dreamcatcher) <si...@x3...>
X3ng Web Technology <http://www.x3ng.com.br>
GNU/Linux user 257852
Debian GNU/Linux 3.0 (Sid) 2.4.20-powerpc ppc
Type louder, please.
-----------------------------------------------------------------------
Verified for virus by mail.redesul.com.br
Scanner: clamscan / ClamAV - Version 0.54 - Updated 01/07/2003
|