@lD.log((logBase + '.commitData'))
def commitData(logger, query, values=None, dbName=None):
    'query data from the database\n    \n    Query the data over here. If there is a problem with\n    the data, it is going to return the value of ``None``, and\n    log the error. Your program needs to check whether \n    there was an error with the query by checking for a ``None``\n    return value\n    \n    Parameters\n    ----------\n    logger : {logging.logger}\n        logging element \n    query : {str}\n        The query to be made to the databse\n    values : {tuple or list-like}, optional\n        Additional values to be passed to the query (the default \n        is None)\n    dbName : {str or None}, optional\n        The name of the database to use. If this is None, the function will \n        attempt to read the name from the ``defaultDB`` item within the \n        file ``../config/db.json``. \n    \n    Returns\n    -------\n    True or None\n        On successful completion, a ``True`` is returned. In case\n        there is an error, the error will be logged, and a ``None`` will\n        be returnd\n    '
    vals = True
    try:
        db = jsonref.load(open('../config/db.json'))
        if ((dbName is None) and ('defaultDB' in db)):
            dbName = db['defaultDB']
        if (dbName is None):
            logger.error('A database name has not been specified.')
            return None
        conn = sqlite3.connect(db[dbName]['connection'])
        cur = conn.cursor()
    except Exception as e:
        logger.error('Unable to connect to the database')
        logger.error(str(e))
        return None
    try:
        if (values is None):
            cur.execute(query)
        else:
            cur.execute(query, values)
    except Exception as e:
        logger.error('Unable to obtain data from the database for:\n query: {}\nvalues'.format(query, values))
        logger.error(str(e))
        vals = None
    try:
        conn.commit()
        cur.close()
        conn.close()
    except Exception as e:
        logger.error('Unable to disconnect to the database')
        logger.error(str(e))
        return
    return vals
query data from the database

Query the data over here. If there is a problem with
the data, it is going to return the value of ``None``, and
log the error. Your program needs to check whether 
there was an error with the query by checking for a ``None``
return value

Parameters
----------
logger : {logging.logger}
    logging element 
query : {str}
    The query to be made to the databse
values : {tuple or list-like}, optional
    Additional values to be passed to the query (the default 
    is None)
dbName : {str or None}, optional
    The name of the database to use. If this is None, the function will 
    attempt to read the name from the ``defaultDB`` item within the 
    file ``../config/db.json``. 

Returns
-------
True or None
    On successful completion, a ``True`` is returned. In case
    there is an error, the error will be logged, and a ``None`` will
    be returnd
@lD.log((logBase + '.commitData'))
def commitData(logger, query, values=None, dbName=None):
    'query data from the database\n    \n    Query the data over here. If there is a problem with\n    the data, it is going to return the value of ``None``, and\n    log the error. Your program needs to check whether \n    there was an error with the query by checking for a ``None``\n    return value\n    \n    Parameters\n    ----------\n    logger : {logging.logger}\n        logging element \n    query : {str}\n        The query to be made to the databse\n    values : {tuple or list-like}, optional\n        Additional values to be passed to the query (the default \n        is None)\n    dbName : {str or None}, optional\n        The name of the database to use. If this is None, the function will \n        attempt to read the name from the ``defaultDB`` item within the \n        file ``../config/db.json``. \n    \n    Returns\n    -------\n    True or None\n        On successful completion, a ``True`` is returned. In case\n        there is an error, the error will be logged, and a ``None`` will\n        be returnd\n    '
    vals = True
    try:
        db = jsonref.load(open('../config/db.json'))
        if ((dbName is None) and ('defaultDB' in db)):
            dbName = db['defaultDB']
        if (dbName is None):
            logger.error('A database name has not been specified.')
            return None
        conn = sqlite3.connect(db[dbName]['connection'])
        cur = conn.cursor()
    except Exception as e:
        logger.error('Unable to connect to the database')
        logger.error(str(e))
        return None
    try:
        if (values is None):
            cur.execute(query)
        else:
            cur.execute(query, values)
    except Exception as e:
        logger.error('Unable to obtain data from the database for:\n query: {}\nvalues'.format(query, values))
        logger.error(str(e))
        vals = None
    try:
        conn.commit()
        cur.close()
        conn.close()
    except Exception as e:
        logger.error('Unable to disconnect to the database')
        logger.error(str(e))
        return
    return vals