[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue-common/src/datasources GIntrospection.py
From: |
Jason Cater |
Subject: |
gnue-common/src/datasources GIntrospection.py |
Date: |
Tue, 25 Nov 2003 14:39:58 -0500 |
CVSROOT: /cvsroot/gnue
Module name: gnue-common
Branch:
Changes by: Jason Cater <address@hidden> 03/11/25 14:39:58
Modified files:
src/datasources: GIntrospection.py
Log message:
Simplified API for getting field names from a table schema
Before: table.getChildSchema(table)
After: table.fields()
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/GIntrospection.py.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
Patches:
Index: gnue-common/src/datasources/GIntrospection.py
diff -c gnue-common/src/datasources/GIntrospection.py:1.2
gnue-common/src/datasources/GIntrospection.py:1.3
*** gnue-common/src/datasources/GIntrospection.py:1.2 Tue Nov 25 12:01:29 2003
--- gnue-common/src/datasources/GIntrospection.py Tue Nov 25 14:39:57 2003
***************
*** 74,80 ****
self.type = ''
self.__dict__.update(attrs)
if getChildSchema != None:
! self.getChildSchema = getChildSchema
def __cmp__(self, other):
if not isinstance(other, Schema):
--- 74,80 ----
self.type = ''
self.__dict__.update(attrs)
if getChildSchema != None:
! self._getChildSchema = getChildSchema
def __cmp__(self, other):
if not isinstance(other, Schema):
***************
*** 84,91 ****
--- 84,102 ----
else:
return cmp(string.lower(self.name), string.lower(other.name)) or 1
+ def fields(self):
+ return self._getChildSchema(self)
+
+ # TODO: Last supported in 0.5.2... Delete before 1.0
def getChildSchema(self, parent):
+ print "WARNING: Your application is calling
Schema.getChildSchema(parent), which has been deprecated in favor of
Schema.fields()"
+ return self.fields()
+
+ def _getChildSchema(self, parent):
return ()
+
+
+
- gnue-common/src/datasources GIntrospection.py,
Jason Cater <=