filterDatabase = async (database, term = '', req = {}) => {
    /** @type {import('@home-gallery/types').TQueryContext} */
    const queryContext = createQueryContext(context, req)
    const data = await executeQuery(database.data, term, queryContext)
    log.trace({ast: queryContext.ast, queryAst: queryContext.queryAst}, `Queried database with ${queryContext.stringifiedQueryAst}`)
    return {...database, data}
  }
@param {object} database
@param {string} [term]
@param {object} [req]
@returns {Promise<object>}