[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r7276 - trunk/gnue-common/src/datasources/drivers/interbase/inter
From: |
reinhard |
Subject: |
[gnue] r7276 - trunk/gnue-common/src/datasources/drivers/interbase/interbase |
Date: |
Tue, 29 Mar 2005 12:55:18 -0600 (CST) |
Author: reinhard
Date: 2005-03-29 12:55:17 -0600 (Tue, 29 Mar 2005)
New Revision: 7276
Removed:
trunk/gnue-common/src/datasources/drivers/interbase/interbase/ResultSet.py
Modified:
trunk/gnue-common/src/datasources/drivers/interbase/interbase/Connection.py
trunk/gnue-common/src/datasources/drivers/interbase/interbase/DataObject.py
Log:
Use new _broken_rowcount parameter instead of own DataObject/ResultSet
implementation for interbase driver.
Modified:
trunk/gnue-common/src/datasources/drivers/interbase/interbase/Connection.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/interbase/interbase/Connection.py
2005-03-29 18:51:03 UTC (rev 7275)
+++ trunk/gnue-common/src/datasources/drivers/interbase/interbase/Connection.py
2005-03-29 18:55:17 UTC (rev 7276)
@@ -50,6 +50,7 @@
_boolean_true = 1
_boolean_false = 0
_numbers_as_string = False
+ _broken_rowcount = True
defaultBehavior = Introspection
defaultCreator = Creation
Modified:
trunk/gnue-common/src/datasources/drivers/interbase/interbase/DataObject.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/interbase/interbase/DataObject.py
2005-03-29 18:51:03 UTC (rev 7275)
+++ trunk/gnue-common/src/datasources/drivers/interbase/interbase/DataObject.py
2005-03-29 18:55:17 UTC (rev 7276)
@@ -31,46 +31,14 @@
__all__ = ['DataObject_SQL','DataObject_Object']
-import sys
-from gnue.common.datasources import Exceptions
-from gnue.common.apps import errors
from gnue.common.datasources.drivers import DBSIG2
-from ResultSet import ResultSet
+
class _Base (DBSIG2.DataObject):
# The date/time format used in insert/select statements
# (based on format used for time.strftime())
_dateTimeFormat = "cast('%Y-%m-%d %H:%M:%S' as timestamp)"
- _resultSetClass = ResultSet
- # ---------------------------------------------------------------------------
- # Create a result set
- # ---------------------------------------------------------------------------
-
- def _createResultSet (self, conditions = {}, readOnly = 0,
- masterRecordSet = None, sql = ""):
-
- try:
- query = self._buildQuery (conditions, additionalSQL = sql)
- cursor = self._connection.makecursor (query)
- cursor.arraysize = self.cache
-
- except self._DatabaseError:
- raise Exceptions.ConnectionError, errors.getException () [2]
-
- # Our ResultSet class performs an implicit record-count in it's constructor
- # so we won't force another duplicate count
-
- rs = self._resultSetClass (self, cursor = cursor,
- masterRecordSet = masterRecordSet, conditions = conditions, sql = sql,
- fieldOrder = self._fieldOrder)
-
- if readOnly:
- rs._readonly = readOnly
-
- return rs
-
-
class DataObject_Object (_Base, DBSIG2.DataObject_Object):
pass
Deleted:
trunk/gnue-common/src/datasources/drivers/interbase/interbase/ResultSet.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/interbase/interbase/ResultSet.py
2005-03-29 18:51:03 UTC (rev 7275)
+++ trunk/gnue-common/src/datasources/drivers/interbase/interbase/ResultSet.py
2005-03-29 18:55:17 UTC (rev 7276)
@@ -1,50 +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-2005 Free Software Foundation
-#
-# FILE:
-# interbase/ResultSet.py
-#
-# DESCRIPTION:
-# Driver to provide access to data via the Kinterbasdb Interbase/Firebird
Python Driver
-# Requires Kinterbasdb > 3.0 (http://kinterbasdb.sourceforge.net/)
-#
-# NOTES:
-#
-
-__all__ = ['ResultSet']
-
-import string
-from gnue.common.datasources.drivers import DBSIG2
-
-
-#
-#
-#
-class ResultSet(DBSIG2.ResultSet):
-
- def __init__(self, *args, **parms):
- self.conditions = parms['conditions']
- self.sql = parms['sql']
- del parms['conditions']
- del parms['sql']
-
- DBSIG2.ResultSet.__init__(self, *args, **parms)
-
- self._recordCount = self._dataObject._getQueryCount(self.conditions,
self.sql)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r7276 - trunk/gnue-common/src/datasources/drivers/interbase/interbase,
reinhard <=