src/dirbs/utils.py
def table_exists_sql(any_schema=False):
    """
    SQL to check for existence of a table. Note that for temp tables, any_schema should be set to True.

    Arguments:
        any_schema: filtration bool for schema
    Returns:
        sql
    """
    if not any_schema:
        schema_filter_sql = sql.SQL('AND schemaname = current_schema()')
    else:
        schema_filter_sql = sql.SQL('')

    return sql.SQL("""SELECT EXISTS (SELECT 1
                                       FROM pg_tables
                                      WHERE tablename = %s
                                            {schema_filter_sql})""").format(schema_filter_sql=schema_filter_sql)

    SQL to check for existence of a table. Note that for temp tables, any_schema should be set to True.

    Arguments:
        any_schema: filtration bool for schema
    Returns:
        sql
    
SQL to check for existence of a table. Note that for temp tables, any_schema should be set to True.
SQL to check for existence of a table . Note that for temp tables any_schema should be set to True .
def table_exists_sql(any_schema=False):
    if not any_schema:
        schema_filter_sql = sql.SQL('AND schemaname = current_schema()')
    else:
        schema_filter_sql = sql.SQL('')
    return sql.SQL("""SELECT EXISTS (SELECT 1
                                       FROM pg_tables
                                      WHERE tablename = %s
                                            {schema_filter_sql})""").format(schema_filter_sql=schema_filter_sql)
def table_exists_sql ( any_schema = False ) : if not any_schema : schema_filter_sql = sql . SQL ( 'AND schemaname = current_schema()' ) else : schema_filter_sql = sql . SQL ( '' ) return sql . SQL ( """SELECT EXISTS (SELECT 1
                                       FROM pg_tables
                                      WHERE tablename = %s
                                            {schema_filter_sql})""" ) . format ( schema_filter_sql = schema_filter_sql )
SQL to check for existence of a table.
SQL to check for existence of a table .
"""
    SQL to check for existence of a table. Note that for temp tables, any_schema should be set to True.

    Arguments:
        any_schema: filtration bool for schema
    Returns:
        sql
    """
None
any_schema
filtration bool for schema
filtration bool for schema