Example #1
0
    def __init__(self):
        FormatWriter.__init__(
            self,
            u"""Id\tTitle\tSubtitle\tAutocomplete
{0}
""")
        Formatter.set(SimpleFormatter())
Example #2
0
 def __init__(self, options):
     FormatWriter.__init__(
         self,
         u'{0}\n',
         u'delete from {table} where {restriction};')
     Formatter.set(DefaultFormatter())
     self.options = options
Example #3
0
 def __init__(self, options):
     FormatWriter.__init__(
         self,
         u'{0}\n',
         u'update {table} set {values} where {restriction};')
     Formatter.set(DefaultFormatter())
     self.options = options
Example #4
0
    def __init__(
            self,
            items_format=u"""Title\tAutocomplete
{0}""",
            item_format=u"""{title}\t{autocomplete}"""):
        FormatWriter.__init__(self, items_format, item_format)
        Formatter.set(TestFormatter())
Example #5
0
 def __init__(self, options=None):
     FormatWriter.__init__(
         self,
         u'{0}\n',
         u'insert into {table} ({columns}) values ({values});')
     Formatter.set(DefaultFormatter())
     self.table_name = options.table_name
Example #6
0
 def __init__(self, options):
     FormatWriter.__init__(
         self,
         FORMATS.get(options.verbose, FORMATS[0]),
         ITEM_FORMATS.get(options.verbose, ITEM_FORMATS[0]))
     Formatter.set(DefaultFormatter())
     self.options = options
Example #7
0
    def __init__(self, include_tables=False):
        FormatWriter.__init__(self, u"""digraph dbgraph {{
{0}
}}
""")
        self.include_tables = include_tables
        Formatter.set(GraphvizFormatter())
Example #8
0
    def __init__(self):
        FormatWriter.__init__(
            self,
            u"""[
{0}
]
""", item_separator=u',\n',)
        Formatter.set(JsonFormatter())
Example #9
0
 def __init__(self, options=None):
     FormatWriter.__init__(
         self,
         u'{0}\n',
         u"""{prefix}    - &{table}_{id} !!{package}.{model}
     {tuples}""")
     Formatter.set(DefaultFormatter())
     self.package = options.package
     self.last_table = None
Example #10
0
    def __init__(
            self,
            items_format=u"Title\tSubtitle\tAutocomplete\n{0}\n",
            item_format=u"{title}\t{subtitle}\t{autocomplete}",
            item_separator=u"\n",
            format_error_format=u'{0}'):
        self.items_format = items_format
        self.item_format = item_format
        self.item_separator = item_separator
        self.format_error_format = format_error_format

        Formatter.set(DefaultFormatter())
Example #11
0
 def format(self):
     return Formatter.format_node(self)
Example #12
0
 def __init__(self, *args):
     StdoutWriter.__init__(self, u'{0}\n', u'{item}')
     Formatter.set(DefaultFormatter())
Example #13
0
 def __init__(self, left=None, right=None):
     FormatWriter.__init__(self, u'{0}\n')
     Formatter.set(DefaultFormatter())
     self.left = left
     self.right = right
Example #14
0
 def __init__(self):
     FormatWriter.__init__(self, u'{0}', u'{autocomplete}')
     Formatter.set(AutocompleteFormatter())
Example #15
0
 def __init__(self):
     FormatWriter.__init__(self, u'{0}\n')
     Formatter.set(SimplifiedFormatter())
Example #16
0
 def __init__(self, options=None):
     FormatWriter.__init__(self, u'{0}\n')
     if options.verbose > 0:
         Formatter.set(VerboseGraphFormatter(options))
     else:
         Formatter.set(DefaultFormatter())
Example #17
0
 def format(self):
     return Formatter.format_column_node(self)
Example #18
0
 def format(self):
     return Formatter.format_row(self)
Example #19
0
 def format(self):
     return Formatter.format_foreign_key_node(self)
Example #20
0
 def __init__(self, options=None):
     FormatWriter.__init__(
         self,
         u'{0}\n',
         options.format)
     Formatter.set(DefaultFormatter())