示例#1
0
def view_deleter(social_tenure, engine):
    """
    Deletes str database views using the information in the social tenure
    object.
    :param social_tenure: Social tenure object containing the view
    information.
    :type social_tenure: SocialTenure
    :param engine: SQLAlchemy connectable object.
    :type engine: Engine
    """
    views = social_tenure.views.keys()

    for v in views:
        LOGGER.debug('Attempting to delete %s view...', v)
        drop_view(v)
示例#2
0
def view_deleter(social_tenure, engine):
    """
    Deletes str database views using the information in the social tenure
    object.
    :param social_tenure: Social tenure object containing the view
    information.
    :type social_tenure: SocialTenure
    :param engine: SQLAlchemy connectable object.
    :type engine: Engine
    """
    views = social_tenure.views.keys()

    for v in views:
        LOGGER.debug('Attempting to delete %s view...', v)
        drop_view(v)
示例#3
0
def drop_dependencies(entity):
    """
    Deletes dependent views before deleting the table.
    :return: True if the DROP succeeded, otherwise False.
    :rtype: bool
    """
    dep = entity.dependencies()
    dep_views = dep['views']

    for v in dep_views:
        status = drop_view(v)

        if not status:
            return False

    return True
示例#4
0
def drop_dependencies(entity):
    """
    Deletes dependent views before deleting the table.
    :return: True if the DROP succeeded, otherwise False.
    :rtype: bool
    """
    dep = entity.dependencies()
    dep_views = dep['views']

    for v in dep_views:
        status = drop_view(v)

        if not status:
            return False

    return True