[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
r6821 - trunk/gnue-common/src/schema/scripter
From: |
johannes |
Subject: |
r6821 - trunk/gnue-common/src/schema/scripter |
Date: |
Thu, 23 Dec 2004 14:24:27 -0600 (CST) |
Author: johannes
Date: 2004-12-23 14:24:25 -0600 (Thu, 23 Dec 2004)
New Revision: 6821
Modified:
trunk/gnue-common/src/schema/scripter/Scripter.py
Log:
Add all tables without constraint-definitions in the same order as listed in
the gsd at the end of the tableOrder sequence
Modified: trunk/gnue-common/src/schema/scripter/Scripter.py
===================================================================
--- trunk/gnue-common/src/schema/scripter/Scripter.py 2004-12-23 13:31:16 UTC
(rev 6820)
+++ trunk/gnue-common/src/schema/scripter/Scripter.py 2004-12-23 20:24:25 UTC
(rev 6821)
@@ -248,6 +248,7 @@
self.tables = {}
self.tabledata = {}
+ self.unordered = []
for item in range (len (self._files)):
print o (u_("Loading gsd file '%s' ...") % self.ARGUMENTS [item])
@@ -290,7 +291,14 @@
self.tableOrder.extend (add)
add = self.__shrinkList (tables, CircularReferenceError)
+ # Now make sure to append all tables to the tableOrder, which are not yet
+ # listed. These could be the case if no table-definition is given for a
+ # table.
+ for item in self.unordered:
+ if not item in self.tableOrder:
+ self.tableOrder.append (item)
+
# ---------------------------------------------------------------------------
# Return all items from the dictionary which have no dependencies
# ---------------------------------------------------------------------------
@@ -378,6 +386,8 @@
self.tabledata [tableKey] = {'name': sObject.tablename,
'rows': [],
'defi': {'fields': [], 'key': []}}
+ if not tableKey in self.unordered:
+ self.unordered.append (tableKey)
sObject.walk (self.__dataRows, defs = self.tabledata [tableKey])
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- r6821 - trunk/gnue-common/src/schema/scripter,
johannes <=