(cur, sql, params = None, **kwargs)
return row[0]
Helper function to fetch one value Takes away all the hassle of preparing statements
        and processing returned result giving out just one value.
Helper function to fetch one value Takes away all the hassle of preparing statements
        and processing returned result giving out just one value.
Helper function to fetch one value Takes away all the hassle of preparing statements and processing returned result giving out just one value .
def run_lookup(cur, sql, params = None, **kwargs):
    """ Helper function to fetch one value Takes away all the hassle of preparing statements
        and processing returned result giving out just one value.
    """
    params = params or kwargs
    sql = QueryBuilder(sql, params).get_sql(0)
    cur.execute(sql)
    row = cur.fetchone()
    if row is None:
        return None
    return row[0]
def run_lookup ( cur , sql , params = None , * * kwargs ) : params = params or kwargs sql = QueryBuilder ( sql , params ) . get_sql ( 0 ) cur . execute ( sql ) row = cur . fetchone ( ) if row is None : return None return row [ 0 ]