Пример #1
0
 def to_dot(self):
     base = ROW_TAGS.format(' ALIGN="LEFT"',
                            '{key_opening}{col_name}{key_closing}{type}')
     return base.format(key_opening='<u>' if self.is_key else '',
                        key_closing='</u>' if self.is_key else '',
                        col_name=FONT_TAGS.format(self.name),
                        type=FONT_TAGS.format(' [{}]').format(self.type)
                        if self.type is not None else '')
Пример #2
0
 def to_dot(self):
     base = ROW_TAGS.format(' ALIGN="LEFT"', '{key_opening}{col_name}{key_closing}{type}')
     return base.format(
         key_opening='<u>' if self.is_key else '',
         key_closing='</u>' if self.is_key else '',
         col_name=FONT_TAGS.format(self.name),
         type=FONT_TAGS.format(' [{}]').format(self.type) if self.type is not None else ''
     )
Пример #3
0
 def to_dot(self):
     base = ROW_TAGS.format(
         ' ALIGN="LEFT" PORT="{}"'.format(self.name),
         '{key_opening}{col_name}{key_closing}{type}{null}')
     return base.format(key_opening='<u>' if self.is_key else '',
                        key_closing='</u>' if self.is_key else '',
                        col_name=FONT_TAGS.format(self.name),
                        type=FONT_TAGS.format(' [{}]').format(self.type)
                        if self.type is not None else '',
                        null=" NOT NULL" if not self.is_null else "")
Пример #4
0
 def header_dot(self):
     return ROW_TAGS.format(
         '', '<B><FONT POINT-SIZE="16">{}</FONT></B>').format(self.name)
Пример #5
0
 def header_dot(self):
     return ROW_TAGS.format('', '<B><FONT POINT-SIZE="16">{}</FONT></B>').format(self.name)