commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

r5650 - trunk/gnue-common/src/datasources/drivers/mysql/mysql


From: johannes
Subject: r5650 - trunk/gnue-common/src/datasources/drivers/mysql/mysql
Date: Tue, 6 Apr 2004 09:32:06 -0500 (CDT)

Author: johannes
Date: 2004-04-06 09:32:05 -0500 (Tue, 06 Apr 2004)
New Revision: 5650

Removed:
   trunk/gnue-common/src/datasources/drivers/mysql/mysql/RecordSet.py
   trunk/gnue-common/src/datasources/drivers/mysql/mysql/ResultSet.py
Log:
Both files were never used ...


Deleted: trunk/gnue-common/src/datasources/drivers/mysql/mysql/RecordSet.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/mysql/mysql/RecordSet.py  
2004-04-06 14:29:36 UTC (rev 5649)
+++ trunk/gnue-common/src/datasources/drivers/mysql/mysql/RecordSet.py  
2004-04-06 14:32:05 UTC (rev 5650)
@@ -1,38 +0,0 @@
-#
-# This file is part of GNU Enterprise.
-#
-# GNU Enterprise is free software; you can redistribute it
-# and/or modify it under the terms of the GNU General Public
-# License as published by the Free Software Foundation; either
-# version 2, or (at your option) any later version.
-#
-# GNU Enterprise is distributed in the hope that it will be
-# useful, but WITHOUT ANY WARRANTY; without even the implied
-# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-# PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public
-# License along with program; see the file COPYING. If not,
-# write to the Free Software Foundation, Inc., 59 Temple Place
-# - Suite 330, Boston, MA 02111-1307, USA.
-#
-# Copyright 2000-2004 Free Software Foundation
-#
-# FILE:
-# mysql/RecordSet.py
-#
-# DESCRIPTION:
-# Driver to provide access to data vi MySQL
-#
-# NOTES:
-
-__all__ = ['RecordSet']
-
-import string
-from gnue.common.datasources.drivers import DBSIG2
-
-class MySQL_RecordSet(DBSIG2.RecordSet):
-  pass
-
-
-

Deleted: trunk/gnue-common/src/datasources/drivers/mysql/mysql/ResultSet.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/mysql/mysql/ResultSet.py  
2004-04-06 14:29:36 UTC (rev 5649)
+++ trunk/gnue-common/src/datasources/drivers/mysql/mysql/ResultSet.py  
2004-04-06 14:32:05 UTC (rev 5650)
@@ -1,93 +0,0 @@
-#
-# This file is part of GNU Enterprise.
-#
-# GNU Enterprise is free software; you can redistribute it
-# and/or modify it under the terms of the GNU General Public
-# License as published by the Free Software Foundation; either
-# version 2, or (at your option) any later version.
-#
-# GNU Enterprise is distributed in the hope that it will be
-# useful, but WITHOUT ANY WARRANTY; without even the implied
-# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-# PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public
-# License along with program; see the file COPYING. If not,
-# write to the Free Software Foundation, Inc., 59 Temple Place
-# - Suite 330, Boston, MA 02111-1307, USA.
-#
-# Copyright 2000-2004 Free Software Foundation
-#
-# FILE:
-# mysql/DBdriver.py
-#
-# DESCRIPTION:
-# Driver to provide access to data vi MySQL
-#
-# NOTES:
-# Supports transactions if the MySQL server is compiled w/transaction support
-# (which it does NOT by default)
-
-
-import string
-import sys
-from gnue.common.datasources.drivers import DBSIG2
-from gnue.common.datasources.Exceptions import ConnectionError
-
-class MySQL_ResultSet(DBSIG2.ResultSet):
-  def __init__(self, dataObject, cursor=None, defaultValues={}, 
masterRecordSet=None, fieldOrder=[]):
-    DBSIG2.ResultSet.__init__(self, dataObject, \
-            cursor, defaultValues, masterRecordSet, fieldOrder=fieldOrder)
-    self._recordSetClass = MySQL_RecordSet
-
-    # Compensate for bug in python mysql drivers older than 0.9.2a2
-    if MySQLdb.__version__ >= '0.9.2a2':
-      self.fetchBugFix = self._cursor.fetchmany
-    else:
-      self.__done = 0
-      self.fetchBugFix = self.__mySqlNeedsLotsOfTLC
-
-
-  # Compensate for MySQL bug
-  def __mySqlNeedsLotsOfTLC(self):
-    if self.__done:
-      return None
-
-    self.__done = 1
-    return self._cursor.fetchall()
-
-
-  def _loadNextRecord(self):
-    if self._cursor:
-      rs = None
-
-      try:
-        # See __init__ for details
-        rsets = self.fetchBugFix()
-
-      except self._dataObject._DatabaseError, err:
-        raise GDataObjects.ConnectionError, err
-
-      if rsets and len(rsets):
-        for rs in(rsets):
-          if rs:
-            i = 0
-            dict = {}
-            for f in (rs):
-              try:
-                name = self._fieldOrder[i]
-                if not name:
-                  raise IndexError
-              except IndexError:
-                  name = string.lower(self._fieldNames[i])
-              dict[name] = f
-              i += 1
-            self._cachedRecords.append (self._recordSetClass(parent=self, \
-                                                             initialData=dict))
-          else:
-            return 0
-        return 1
-      else:
-        return 0
-    else:
-     return 0





reply via email to

[Prev in Thread] Current Thread [Next in Thread]