Update of /cvsroot/sqlobject/SQLObject/SQLObject
In directory sc8-pr-cvs1:/tmp/cvs-serv6070/SQLObject
Modified Files:
DBConnection.py
Log Message:
Fixed up SQLite __init__ a bit (from Peter Wilkinson)
Index: DBConnection.py
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/SQLObject/DBConnection.py,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** DBConnection.py 29 Apr 2003 08:15:10 -0000 1.28
--- DBConnection.py 29 Apr 2003 09:27:55 -0000 1.29
***************
*** 544,554 ****
class SQLiteConnection(DBAPI):
! def __init__(self, dsn, **kw):
assert sqlite, 'sqlite module cannot be found'
! self.dsn = dsn # full path to sqlite-db-file
DBAPI.__init__(self, **kw)
def makeConnection(self):
! return sqlite.connect(self.dsn)
def _queryInsertID(self, conn, table, idName, names, values):
--- 544,560 ----
class SQLiteConnection(DBAPI):
! def __init__(self, filename, **kw):
assert sqlite, 'sqlite module cannot be found'
! self.filename = filename # full path to sqlite-db-file
! if not autoCommit and not kw.has_key('pool'):
! # Pooling doesn't work with transactions...
! kw['pool'] = 0
! # use only one connection for sqlite - supports multiple
! # cursors per connection
! self._conn = sqlite.connect(self.filename)
DBAPI.__init__(self, **kw)
def makeConnection(self):
! return self._conn
def _queryInsertID(self, conn, table, idName, names, values):
|