def main(): """ Main function to read records from the database using join operations :return: Nothing :rtype: None """ # Getting the path for logging config using arparse log_config_file = helper.ARGUMENTS.logfile # Configuring logging helper.configure_logging(log_config_file) engine = connections.create_new_engine(helper.ARGUMENTS.dialect, helper.ARGUMENTS.driver, helper.ARGUMENTS.user, helper.ARGUMENTS.password, helper.ARGUMENTS.host, helper.ARGUMENTS.database) session_factory = connections.get_session_factory(engine) session = session_factory() db_read.perform_read_join(session, helper.ARGUMENTS.number)
def main(): """ Main function to read records from the database to get the top albums :return: Nothing :rtype: None """ # Getting the path for logging config using arparse log_config_file = helper.ARGUMENTS.logfile # Configuring logging helper.configure_logging(log_config_file) # Getting a new engine engine = connections.create_new_engine(helper.ARGUMENTS.dialect, helper.ARGUMENTS.driver, helper.ARGUMENTS.user, helper.ARGUMENTS.password, helper.ARGUMENTS.host, helper.ARGUMENTS.database) # Getting a session factory binded to previously created engine session_factory = connections.get_session_factory(engine) session = session_factory() db_aggregate.get_top_album_tracks(session, helper.ARGUMENTS.number)
def main(): """ Main function to perform the create operation :return: Nothing :rtype: None """ # Getting the path for logging config using arparse log_config_file = helper.ARGUMENTS.logfile # Configuring logging helper.configure_logging(log_config_file) engine = connections.create_new_engine(helper.ARGUMENTS.dialect, helper.ARGUMENTS.driver, helper.ARGUMENTS.user, helper.ARGUMENTS.password, helper.ARGUMENTS.host, helper.ARGUMENTS.database) session_factory = connections.get_session_factory(engine) db_create.perform_create(session_factory)