Exemple #1
0
    def __init__(self, options):
        Wrapper.__init__(self, options)

        if options.formatter:
            Writer.set(options.formatter(options))
        else:
            Writer.set(SqlInsertWriter(options))
Exemple #2
0
    def __init__(self, options):
        Wrapper.__init__(self, options)

        if options.formatter:
            Writer.set(options.formatter(options))
        else:
            Writer.set(StatementActivityWriter(options))
Exemple #3
0
    def __init__(self, options):
        Wrapper.__init__(self, options)

        if options.formatter:
            Writer.set(options.formatter(options))
        else:
            Writer.set(ExecuteWriter())
Exemple #4
0
    def __init__(self, options):
        Wrapper.__init__(self, options)

        if options.formatter:
            Writer.set(options.formatter())
        else:
            Writer.set(SimplifiedWriter())
Exemple #5
0
    def __init__(self, left, right):
        Wrapper.__init__(self, left)

        self.left = left
        self.right = right

        if left.formatter:
            Writer.set(left.formatter(left, right))
        else:
            Writer.set(DiffWriter(left, right))
Exemple #6
0
 def write(self):
     try:
         sys.stdout.write(Writer.write(self.run()))
     except BaseException as e:
         log.logger.exception(e)
         return -1
     return 0
Exemple #7
0
    def test():
        environ['DBNAV_INPUT'] = path.join(dir, 'resources', tc)
        p, e = params(dir, tc), expected(dir, tc)
        items = f.run([
            '--debug',
            '-L', LOGFILE] + parameters + p)
        actual = Writer.write(items)
        write_actual(command, tc, actual)

        # WARNING: this is code that creates the expected output - only
        # uncomment when in need!
        # e = update_expected(dir, tc, actual)

        assert_equal(e, actual)
Exemple #8
0
 def write(self, items):
     sys.stdout.write(Writer.write(items))
     sys.stdout.write('\n')