Commit bed1f805 authored by syt@localhost.localdomain's avatar syt@localhost.localdomain
Browse files

dict for non final relations properties + support for comment in Include file

parent f260132a133c
......@@ -3,7 +3,10 @@ ChangeLog for yams
--
* improved schema definition
* support for comments (lines beginning with a #) in Include file
* new internal dictionary to ease definition of non final relation
properties
2006-07-13 -- 0.5.3
* enhance schema validation (focus on attributes only)
* check password value is an encoded string
......
......@@ -231,6 +231,8 @@ class SchemaLoader(object):
continue
if filename.lower() == 'include':
for etype in lines(join(base_directory, filename)):
if etype.startswith('#'):
continue
for filepath in self.include_schema_files(etype):
result.append(filepath)
continue
......
......@@ -408,6 +408,7 @@ class RelationSchema(ERSchema):
'constraints': (),
'order': 0,
'description': ''}
_NONFINAL_RPROPERTIES = {}
_FINAL_RPROPERTIES = {'default': None,
'uid': False,
'indexed': False}
......@@ -535,7 +536,7 @@ class RelationSchema(ERSchema):
"""
basekeys = self._RPROPERTIES.items()
if not self.is_final():
return basekeys
return basekeys + self._NONFINAL_RPROPERTIES.items()
basekeys += self._FINAL_RPROPERTIES.items()
if desttype != 'String':
return basekeys
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment