Exemple #1
0
def cli():
    """Entry point for the application script"""
    parser = get_argparser()

    args = parser.parse_args()
    check_args(args)
    render_er(args.uri,
              args.output,
              include_tables=args.include_tables,
              include_columns=args.include_columns,
              exclude_tables=args.exclude_tables,
              exclude_columns=args.exclude_columns,
              schema=args.s)
Exemple #2
0
def cli():
    """Entry point for the application script"""
    parser = argparse.ArgumentParser(prog='ERAlchemy')
    parser.add_argument('-i', nargs='?', help='Database URI to process.')
    parser.add_argument('-o', nargs='?', help='Name of the file to write.')
    parser.add_argument('-s', nargs='?', help='Name of the schema.')
    parser.add_argument('-x', nargs='*', help='Name of the table(s) to exclude.')
    parser.add_argument('-v', help='Prints version number.', action='store_true')

    args = parser.parse_args()
    check_args(args)
    if args.v:
        print('ERAlchemy version {}.'.format(__version__))
        exit(0)
    render_er(args.i, args.o, exclude=args.x, schema=args.s)
Exemple #3
0
def cli():
    """Entry point for the application script"""
    parser = argparse.ArgumentParser(prog='ERAlchemy')
    parser.add_argument('-i', nargs='?', help='Database URI to process.')
    parser.add_argument('-o', nargs='?', help='Name of the file to write.')
    parser.add_argument('-s', nargs='?', help='Name of the schema.')
    parser.add_argument('-x', nargs='*', help='Name of the table(s) to exclude.')
    parser.add_argument('-v', help='Prints version number.', action='store_true')

    args = parser.parse_args()
    check_args(args)
    if args.v:
        print('ERAlchemy version {}.'.format(__version__))
        exit(0)
    render_er(args.i, args.o, exclude=args.x, schema=args.s)
Exemple #4
0
def cli():
    """Entry point for the application script"""
    parser = get_argparser()

    args = parser.parse_args()
    check_args(args)
    if args.v:
        print('ERAlchemy version {}.'.format(__version__))
        exit(0)
    render_er(args.i,
              args.o,
              include_tables=args.include_tables,
              include_columns=args.include_columns,
              exclude_tables=args.exclude_tables,
              exclude_columns=args.exclude_columns,
              schema=args.s)
Exemple #5
0
def cli():
    """Entry point for the application script"""
    parser = get_argparser()

    args = parser.parse_args()
    check_args(args)
    if args.v:
        print('ERAlchemy version {}.'.format(__version__))
        exit(0)
    render_er(
        args.i,
        args.o,
        include_tables=args.include_tables,
        include_columns=args.include_columns,
        exclude_tables=args.exclude_tables,
        exclude_columns=args.exclude_columns,
        schema=args.s
    )
Exemple #6
0
def cli():
    """Entry point for the application script"""
    parser = argparse.ArgumentParser(prog='ERAlchemy')
    parser.add_argument('-i', nargs='?', help='Database URI to process.')
    parser.add_argument('-o', nargs='?', help='Name of the file to write.')
    parser.add_argument('-s', nargs='?', help='Name of the schema.')

    parser.add_argument('--exclude-tables',
                        '-x',
                        nargs='+',
                        help='Name of tables not to be displayed.')
    parser.add_argument(
        '--exclude-columns',
        nargs='+',
        help='Name of columns not to be displayed (for all tables).')
    parser.add_argument('--include-tables',
                        nargs='+',
                        help='Name of tables to be displayed alone.')
    parser.add_argument(
        '--include-columns',
        nargs='+',
        help='Name of columns to be displayed alone (for all tables).')

    parser.add_argument('-v',
                        help='Prints version number.',
                        action='store_true')

    args = parser.parse_args()
    check_args(args)
    if args.v:
        print('ERAlchemy version {}.'.format(__version__))
        exit(0)
    render_er(args.i,
              args.o,
              include_tables=args.include_tables,
              include_columns=args.include_columns,
              exclude_tables=args.exclude_tables,
              exclude_columns=args.exclude_columns,
              schema=args.s)
Exemple #7
0
def parse_test(lst_arguments):
    parser = get_argparser()
    args = parser.parse_args(lst_arguments)
    check_args(args)
def parse_test(lst_arguments):
    parser = get_argparser()
    args = parser.parse_args(lst_arguments)
    check_args(args)