@Override
	public QueryResponseRecord query(BSimQuery<?> query) {
		if ((!isInitialized()) && !(query instanceof CreateDatabase) &&
			!(query instanceof DropDatabase)) {
			lastError = new BSimError(ErrorCategory.Nodatabase, "The database does not exist");
			return null;
		}
		lastError = null;
		try {
			query.buildResponseTemplate();
			if (query instanceof QueryNearest) {
				fdbQueryNearest((QueryNearest) query);
			}
			else if (query instanceof QueryNearestVector) {
				fdbQueryNearestVector((QueryNearestVector) query);
			}
			else if (query instanceof InsertRequest) {
				fdbDatabaseInsert((InsertRequest) query);
			}
			else if (query instanceof QueryInfo) {
				fdbDatabaseInfo((QueryInfo) query);
			}
			else if (query instanceof QueryName) {
				fdbQueryName((QueryName) query);
			}
			else if (query instanceof QueryExeInfo) {
				fdbQueryExeInfo((QueryExeInfo) query);
			}
			else if (query instanceof QueryExeCount) {
				fdbQueryExeCount((QueryExeCount) query);
			}
			else if (query instanceof DropDatabase q) {
				fdbDatabaseDrop(q);
			}
			else if (query instanceof CreateDatabase) {
				fdbDatabaseCreate((CreateDatabase) query);
			}
			else if (query instanceof QueryChildren) {
				fdbQueryChildren((QueryChildren) query);
			}
			else if (query instanceof QueryDelete) {
				fdbDelete((QueryDelete) query);
			}
			else if (query instanceof QueryUpdate) {
				fdbUpdate((QueryUpdate) query);
			}
			else if (query instanceof QueryVectorId) {
				fdbQueryVectorId((QueryVectorId) query);
			}
			else if (query instanceof QueryVectorMatch) {
				fdbQueryVectorMatch((QueryVectorMatch) query);
			}
			else if (query instanceof QueryPair) {
				fdbQueryPair((QueryPair) query);
			}
			else if (query instanceof InstallCategoryRequest) {
				fdbInstallCategory((InstallCategoryRequest) query);
			}
			else if (query instanceof InstallTagRequest) {
				fdbInstallTag((InstallTagRequest) query);
			}
			else if (query instanceof InstallMetadataRequest) {
				fdbInstallMetadata((InstallMetadataRequest) query);
			}
			else if (query instanceof AdjustVectorIndex) {
				fdbAdjustVectorIndex((AdjustVectorIndex) query);
			}
			else if (query instanceof PrewarmRequest) {
				fdbPrewarm((PrewarmRequest) query);
			}
			else if (query instanceof PasswordChange) {
				fdbPasswordChange((PasswordChange) query);
			}
			else {
				lastError = new BSimError(ErrorCategory.Fatal, "Unknown query type");
				query.clearResponse();
			}
		}
		catch (DatabaseNonFatalException err) {
			lastError = new BSimError(ErrorCategory.Nonfatal,
				"Skipping -" + query.getName() + "- : " + err.getMessage());
			query.clearResponse();
		}
		catch (LSHException err) {
			lastError = new BSimError(ErrorCategory.Fatal,
				"Fatal error during -" + query.getName() + "- : " + err.getMessage());
			query.clearResponse();
		}
		catch (ElasticException err) {
			lastError = new BSimError(ErrorCategory.Fatal,
				"Elastic error during -" + query.getName() + "- : " + err.getMessage());
			query.clearResponse();
		}
		return query.getResponse();
	}
Initialize a new BSim repository.  This does most of the work of reading
configuration info and setting up the various factories.
@param config is the Configuration object that is populated during initialization
@throws ElasticException for communication problems with the server
@throws NoDatabaseException if the specific database does not exist on the server
Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/elastic/ElasticDatabase.java