From: brian z. <bz...@us...> - 2001-12-29 18:00:17
|
Update of /cvsroot/jython/jython/Lib In directory usw-pr-cvs1:/tmp/cvs-serv25219/Lib Modified Files: dbexts.py Log Message: changed rowid to lastrowid per the spec Index: dbexts.py =================================================================== RCS file: /cvsroot/jython/jython/Lib/dbexts.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** dbexts.py 2001/12/29 07:17:42 1.3 --- dbexts.py 2001/12/29 18:00:15 1.4 *************** *** 27,48 **** [default] ! name=development [jdbc] ! name=development ! url=jdbc:db:devurl ! username=root ! password=12345 [jdbc] ! name=production ! url=jdbc:db:produrl ! username=root ! password=12345 ! ! [odbc] ! name=development ! username=root ! password=12345 """ --- 27,47 ---- [default] ! name=mysql [jdbc] ! name=mysql ! url=jdbc:mysql://localhost/ziclix ! user= ! pwd= ! driver=org.gjt.mm.mysql.Driver ! datahandler=com.ziclix.python.sql.handler.MySQLDataHandler [jdbc] ! name=pg ! url=jdbc:postgresql://localhost:5432/ziclix ! user=bzimmer ! pwd= ! driver=org.postgresql.Driver ! datahandler=com.ziclix.python.sql.handler.PostgresqlDataHandler """ *************** *** 180,189 **** self.formatter = formatter self.out = out ! self.rowid = None self.updatecount = None if not jndiname: ! if cfg == None: cfg = os.path.join(os.path.split(__file__)[0], "dbexts.ini") ! if isinstance(cfg, IniParser): self.dbs = cfg else: --- 179,192 ---- self.formatter = formatter self.out = out ! self.lastrowid = None self.updatecount = None if not jndiname: ! if cfg == None: ! fn = os.path.join(os.path.split(__file__)[0], "dbexts.ini") ! if not os.path.exists(fn): ! fn = os.path.join(os.environ['HOME'], ".dbexts") ! self.dbs = IniParser(fn) ! elif isinstance(cfg, IniParser): self.dbs = cfg else: *************** *** 222,226 **** continue else: ! raise ImportError("unable to find appropriate mx ODBC module") t = self.dbs[("odbc", dbname)] --- 225,229 ---- continue else: ! raise ImportError("unable to find appropriate mxODBC module") t = self.dbs[("odbc", dbname)] *************** *** 267,271 **** if f: self.results = choose(self.results is None, [], self.results) + f s = cursor.nextset() ! if hasattr(cursor, "rowid"): self.rowid = cursor.rowid if hasattr(cursor, "updatecount"): self.updatecount = cursor.updatecount if self.autocommit or cursor is None: self.db.commit() --- 270,274 ---- if f: self.results = choose(self.results is None, [], self.results) + f s = cursor.nextset() ! if hasattr(cursor, "lastrowid"): self.lastrowid = cursor.lastrowid if hasattr(cursor, "updatecount"): self.updatecount = cursor.updatecount if self.autocommit or cursor is None: self.db.commit() |