def __init__(self, db_host, db_user, db_pass, db_name, db_port=None, seed_rows=None): if db_port is None: db_port = "5432" if db_host is None: db_host = "127.0.0.1" super().__init__(db_host=db_host, db_user=db_user, db_pass=db_pass, db_name=db_name, db_port=db_port, seed_rows=seed_rows) self.__runner = execution.PSqlCmdRunner(db_host=db_host, db_user=db_user, db_pass=db_pass, db_name=db_name, db_port=db_port) self.__dumper = execution.PSqlDumpRunner(db_host=db_host, db_user=db_user, db_pass=db_pass, db_name=db_name, db_port=db_port)
def __init__(self, db_host, db_user, db_pass, db_name, db_port=None, seed_rows=None, cmd_opts=None, dump_opts=None): if db_port is None: db_port = "5432" if db_host is None: db_host = "127.0.0.1" if cmd_opts is None: cmd_opts = "" if dump_opts is None: dump_opts = "" super().__init__(db_host=db_host, db_user=db_user, db_pass=db_pass, db_name=db_name, db_port=db_port, seed_rows=seed_rows) self.__runner = execution.PSqlCmdRunner(db_host=db_host, db_user=db_user, db_pass=db_pass, db_name=db_name, db_port=db_port, additional_opts=cmd_opts) self.__dumper = execution.PSqlDumpRunner(db_host=db_host, db_user=db_user, db_pass=db_pass, db_name=db_name, db_port=db_port, additional_opts=dump_opts)
def __init__( self, db_host, db_user, db_pass, db_name, db_port=None, seed_rows=None, cmd_opts=None, dump_opts=None, ): if db_port is None: db_port = "5432" if db_host is None: db_host = "127.0.0.1" if cmd_opts is None: cmd_opts = "" if dump_opts is None: dump_opts = "" self.db_host = db_host self.db_user = db_user self.db_pass = db_pass self.db_name = db_name self.db_port = db_port if seed_rows is None: seed_rows = 150 self.seed_rows = int(seed_rows) self.__runner = execution.PSqlCmdRunner( db_host=db_host, db_user=db_user, db_pass=db_pass, db_name=db_name, db_port=db_port, additional_opts=cmd_opts, ) self.__dumper = execution.PSqlDumpRunner( db_host=db_host, db_user=db_user, db_pass=db_pass, db_name=db_name, db_port=db_port, additional_opts=dump_opts, )