src/dirbs/utils.py
def query_schema_existence(conn, schema_name):
    """
    Function to verify whether the current database schema ownership is correct.

    Arguments:
        conn: dirbs db connection object
        schema_name: name of the schema to verify
    Returns:
        bool for confirmation
    """
    with conn.cursor() as cur:
        cur.execute('SELECT EXISTS(SELECT 1 FROM information_schema.schemata WHERE SCHEMA_NAME = %s)',
                    [schema_name])
        return cur.fetchone().exists

    Function to verify whether the current database schema ownership is correct.

    Arguments:
        conn: dirbs db connection object
        schema_name: name of the schema to verify
    Returns:
        bool for confirmation
    
Function to verify whether the current database schema ownership is correct.
Function to verify whether the current database schema ownership is correct .
def query_schema_existence(conn, schema_name):
    with conn.cursor() as cur:
        cur.execute('SELECT EXISTS(SELECT 1 FROM information_schema.schemata WHERE SCHEMA_NAME = %s)',
                    [schema_name])
        return cur.fetchone().exists
def query_schema_existence ( conn , schema_name ) : with conn . cursor ( ) as cur : cur . execute ( 'SELECT EXISTS(SELECT 1 FROM information_schema.schemata WHERE SCHEMA_NAME = %s)' , [ schema_name ] ) return cur . fetchone ( ) . exists
Function to verify whether the current database schema ownership is correct.
Function to verify whether the current database schema ownership is correct .
"""
    Function to verify whether the current database schema ownership is correct.

    Arguments:
        conn: dirbs db connection object
        schema_name: name of the schema to verify
    Returns:
        bool for confirmation
    """
bool for confirmation
bool for confirmation
conn
dirbs db connection object
dirbs db connection object
schema_name
name of the schema to verify
name of the schema to verify