dabo Commit
Revision 7280
Date: 2012-10-14 14:06:09 -0700 (Sun, 14 Oct 2012)
Author: Nate
Trac: http://trac.dabodev.com/changeset/7280
Changed:
U trunk/dabo/db/dbMySQL.py
Log:
Fixed a typo in the last commit that broke apps using MySQL connections. Also,
removed some prototype code. I did some additional testing with the commit to
ensure that it doesn't break any of the other backends.
Diff:
Modified: trunk/dabo/db/dbMySQL.py
===================================================================
--- trunk/dabo/db/dbMySQL.py 2012-10-13 18:40:10 UTC (rev 7279)
+++ trunk/dabo/db/dbMySQL.py 2012-10-14 21:06:09 UTC (rev 7280)
@@ -9,7 +9,6 @@
from dabo.lib.utils import ustr
from dCursorMixin import dCursorMixin
-
class MySQLAutoReconnectCursor(dCursorMixin):
def execute(self, sql, params=None, errorClass=None,
convertQMarks=False):
from MySQLdb import OperationalError
@@ -89,19 +88,12 @@
def getDictCursorClass(self):
- return MySQLdb.cursors.DictCursor
+ from MySQLdb.cursors import DictCursor
+ return DictCursor
def getMainCursorClass(self):
return MySQLAutoReconnectCursor
- #def getCursor(self, CursorClass):
- # raise
- # print "CursorClass is: %s" % CursorClass
- # if CursorClass == dCrusorMixin:
- # return MySQLAutoReconnectCursor(self._connection)
- # else:
- # return CursorClass(self._connection)
-
def beginTransaction(self, cursor):
""" Begin a SQL transaction."""
cursor.execute("START TRANSACTION")
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message:
http://leafe.com/archives/byMID/[email protected]