public QueryResponseRecord queryRaw(BSimQuery<?> query, StagingManager stagingManager,
			SFResultsUpdateListener<QueryResponseRecord> listener, TaskMonitor monitor)
			throws QueryDatabaseException, CancelledException {
		QueryResponseRecord response = null;
		try {
			if (database == null || database.getStatus() != Status.Ready) {
				throw new QueryDatabaseException("Connection to database not established");
			}
			if (monitor == null) {
				monitor = TaskMonitor.DUMMY;
			}
			if (listener == null) {
				listener = new NullListener<>();
			}
			if (stagingManager == null) {
				stagingManager = new NullStaging();
			}
			response = doQuery(query, stagingManager, listener, monitor);
		}
		catch (LSHException e) {
			throw new QueryDatabaseException(e.getMessage());
		}
		finally {
			listener.setFinalResult(response);
		}
		return response;
	}
A lower-level (more flexible) query of the database.  The query is not staged.
@param query is the raw query information
@param stagingManager is how to split up the query, can be null
@param listener is the listener to be informed of the query status and incremental results 
		coming back, may be null
@param monitor the task monitor
@return the raw response record from the database
@throws QueryDatabaseException if the database connection cannot be established
@throws CancelledException if the query is cancelled by the user
Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/facade/SimilarFunctionQueryService.java