37 |
from gnue.common.datasources import GDataObjects, GConditions, GConnections |
from gnue.common.datasources import GDataObjects, GConditions, GConnections |
38 |
from gnue.common.apps import GDebug |
from gnue.common.apps import GDebug |
39 |
from gnue.common.datasources.drivers.DBSIG2.Driver \ |
from gnue.common.datasources.drivers.DBSIG2.Driver \ |
40 |
import DBSIG_RecordSet, DBSIG_ResultSet, DBSIG_DataObject, \ |
import DBSIG2.RecordSet, DBSIG2.ResultSet, DBSIG2.DataObject, \ |
41 |
DBSIG_DataObject_SQL, DBSIG_DataObject_Object |
DBSIG2.DataObject_SQL, DBSIG2.DataObject_Object |
42 |
|
|
43 |
from gnue.common.datasources.drivers.oracle.Base.Driver import Oracle_Schema |
from gnue.common.datasources.drivers.oracle.Base.Driver import Oracle_Schema |
44 |
|
|
50 |
|
|
51 |
|
|
52 |
|
|
53 |
class Oracle_RecordSet(DBSIG_RecordSet): |
class Oracle_ResultSet(DBSIG2.ResultSet): |
54 |
pass |
_uniqueIdField = "__GNUeF__uniqueKey_%s" % (self._dataObject.table) |
55 |
|
_uniqueIdFormat = "ROWID='%s'" |
56 |
|
|
57 |
|
|
|
class Oracle_ResultSet(DBSIG_ResultSet): |
|
|
def __init__(self, dataObject, cursor=None, defaultValues={}, masterRecordSet=None): |
|
|
DBSIG_ResultSet.__init__(self, dataObject, \ |
|
|
cursor, defaultValues, masterRecordSet) |
|
|
self._recordSetClass = Oracle_RecordSet |
|
|
self._uniqueIdField = "__GNUeF__uniqueKey_%s" % (self._dataObject.table) |
|
|
self._uniqueIdFormat = "ROWID='%s'" |
|
58 |
|
|
59 |
|
class Oracle_DataObject(DBSIG2.DataObject): |
|
|
|
|
class Oracle_DataObject(Oracle_Schema, DBSIG_DataObject): |
|
60 |
def __init__(self): |
def __init__(self): |
61 |
Oracle_Schema.__init__(self) |
Oracle_Schema.__init__(self) |
62 |
DBSIG_DataObject.__init__(self) |
DBSIG2.DataObject.__init__(self) |
63 |
self._DatabaseError = SIG2api.DatabaseError |
self._DatabaseError = SIG2api.DatabaseError |
64 |
self._resultSetClass = Oracle_ResultSet |
self._resultSetClass = Oracle_ResultSet |
65 |
|
|
77 |
if connectData.has_key('datetimeformat'): |
if connectData.has_key('datetimeformat'): |
78 |
self._dateTimeFormat = "'%s'" % connectData['datetimeformat'] |
self._dateTimeFormat = "'%s'" % connectData['datetimeformat'] |
79 |
|
|
|
self._postConnect() |
|
80 |
|
|
81 |
|
|
82 |
|
|
83 |
class Oracle_DataObject_Object(Oracle_DataObject, \ |
class Oracle_DataObject_Object(Oracle_DataObject, \ |
84 |
DBSIG_DataObject_Object): |
DBSIG2.DataObject_Object): |
85 |
|
|
86 |
def __init__(self): |
def __init__(self): |
87 |
Oracle_DataObject.__init__(self) |
Oracle_DataObject.__init__(self) |
89 |
|
|
90 |
|
|
91 |
def _buildQuery(self, conditions={},forDetail=None,additionalSQL=""): |
def _buildQuery(self, conditions={},forDetail=None,additionalSQL=""): |
92 |
return DBSIG_DataObject_Object._buildQuery(self, conditions, forDetail, additionalSQL) |
return DBSIG2.DataObject_Object._buildQuery(self, conditions, forDetail, additionalSQL) |
93 |
|
|
94 |
def _checkForPrimaryId(self): |
def _checkForPrimaryId(self): |
95 |
|
|
111 |
|
|
112 |
|
|
113 |
class Oracle_DataObject_SQL(Oracle_DataObject, \ |
class Oracle_DataObject_SQL(Oracle_DataObject, \ |
114 |
DBSIG_DataObject_SQL): |
DBSIG2.DataObject_SQL): |
115 |
def __init__(self): |
def __init__(self): |
116 |
# Call DBSIG init first because Oracle_DataObject needs to overwrite |
# Call DBSIG init first because Oracle_DataObject needs to overwrite |
117 |
# some of its values |
# some of its values |
118 |
DBSIG_DataObject_SQL.__init__(self) |
DBSIG2.DataObject_SQL.__init__(self) |
119 |
Oracle_DataObject.__init__(self) |
Oracle_DataObject.__init__(self) |
120 |
|
|
121 |
def _buildQuery(self, conditions={}): |
def _buildQuery(self, conditions={}): |
122 |
return DBSIG_DataObject_SQL._buildQuery(self, conditions) |
return DBSIG2.DataObject_SQL._buildQuery(self, conditions) |
123 |
|
|
124 |
|
|
125 |
|
|