private void fdbQueryNearest(QueryNearest query) throws LSHException, SQLException {
		FunctionDatabase.checkSettingsForQuery(query.manage, info);
		BSimSqlClause filter = null;
		if (query.bsimFilter != null) {
			ExecutableRecord repexe = query.manage.getExecutableRecordSet().first();
			IDSQLResolution idres[] = new IDSQLResolution[query.bsimFilter.numAtoms()];
			for (int i = 0; i < idres.length; ++i) {
				FilterAtom atom = query.bsimFilter.getAtom(i);
				idres[i] = atom.type.generateIDSQLResolution(atom);
				if (idres[i] != null) {
					idres[i].resolve(this, repexe);
				}
			}
			filter = SQLEffects.createFilter(query.bsimFilter, idres, this);
		}
		ResponseNearest response = query.nearresponse;
		response.totalfunc = 0;
		response.totalmatch = 0;
		response.uniquematch = 0;

		DescriptionManager descMgr = new DescriptionManager();
		Iterator<FunctionDescription> iter = query.manage.listAllFunctions();

		queryFunctions(query, filter, response, descMgr, iter);
		response.manage.transferSettings(query.manage); // Echo back the
														// settings
		if (query.fillinCategories && (info.execats != null)) {
			fillinExecutableCategories(response.manage);
		}
	}
Entry point for the QueryNearest command

@param query the query to execute
@throws LSHException if there is a problem creating executable records
@throws SQLException if there is an error issuing the query
Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/client/AbstractSQLFunctionDatabase.java