Update of /cvsroot/sqlobject/SQLObject/SQLObject
In directory sc8-pr-cvs1:/tmp/cvs-serv592
Modified Files:
Col.py DBConnection.py
Log Message:
Fix BoolCol for Sybase and queryInsertID, which was lacking one parameter
Index: Col.py
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/SQLObject/Col.py,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** Col.py 4 Dec 2003 16:46:31 -0000 1.35
--- Col.py 13 Jan 2004 15:24:45 -0000 1.36
***************
*** 307,310 ****
--- 307,313 ----
return "TINYINT"
+ def _sybaseType(self):
+ return "BIT"
+
class BoolCol(Col):
baseClass = SOBoolCol
Index: DBConnection.py
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/SQLObject/DBConnection.py,v
retrieving revision 1.58
retrieving revision 1.59
diff -C2 -d -r1.58 -r1.59
*** DBConnection.py 16 Dec 2003 05:41:11 -0000 1.58
--- DBConnection.py 13 Jan 2004 15:24:45 -0000 1.59
***************
*** 799,809 ****
database=self.db, auto_commit=self.autoCommit)
! def _queryInsertID(self, conn, table, idName, names, values):
c = conn.cursor()
q = self._insertSQL(table, names, values)
if self.debug:
print 'QueryIns: %s' % q
c.execute(q)
! return self.insert_id(conn)
def _queryAddLimitOffset(self, query, start, end):
--- 799,816 ----
database=self.db, auto_commit=self.autoCommit)
! def _queryInsertID(self, conn, table, idName, id, names, values):
c = conn.cursor()
+ if id is not None:
+ names = [idName] + names
+ values = [id] + values
q = self._insertSQL(table, names, values)
if self.debug:
print 'QueryIns: %s' % q
c.execute(q)
! if id is None:
! id = self.insert_id()
! if self.debugOutput:
! self.printDebug(conn, id, 'QueryIns', 'result')
! return id
def _queryAddLimitOffset(self, query, start, end):
|