Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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
Ejemplo n.º 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