@staticmethod
def open_sql_file(file):
    """
        Opens a sql file or other txt like file
        and formats it to be used by the execute() command

        :param file: File to be opened
        :return: Formatted query text
        """
    with open(file, 'r') as f:
        query = f.read().replace('\n', ' ')
    f.close()
    return query
