/[papo]/papo/xot/Field.py
ViewVC logotype

Diff of /papo/xot/Field.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by jlenton, Thu Jul 31 18:55:07 2003 UTC revision 1.2 by jlenton, Wed Sep 3 21:41:38 2003 UTC
# Line 15  class Field(object): Line 15  class Field(object):
15          null = node.prop('null')          null = node.prop('null')
16          auto = node.prop('auto_increment')          auto = node.prop('auto_increment')
17          self.type = node.prop('type')          self.type = node.prop('type')
18            self.default= node.prop('default')
19          self.auto_increment = auto and auto.lower() == 'true'          self.auto_increment = auto and auto.lower() == 'true'
20          self.null = not(null and null.lower() == 'false')          self.null = not(null and null.lower() == 'false')
21    
22  class Reference(Field):  class Reference(Field):
23      def from_node(self, node):      def from_node(self, node):
24          self.symbolic = node.prop('references')          self.symbolic = node.prop('references')
25            null = node.prop('null')
26            self.null = not(null and null.lower() == 'false')
27    
28      def get_reference(self):      def get_reference(self):
29          tg = self.table.group.xot.table_groups[self.symbolic]          tg = self.table.group.xot.table_groups[self.symbolic]
# Line 58  class Reference(Field): Line 61  class Reference(Field):
61      reference = property(get_reference)      reference = property(get_reference)
62      type = property(get_type)      type = property(get_type)
63      auto_increment = property(lambda self:None)      auto_increment = property(lambda self:None)
64      null = property(lambda self: None)      default = property(lambda self: None)

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26