public VectorResult queryVectorById(long id) throws SQLException {

		VectorStoreEntry entry = vectorStore.getVectorById(id);
		if (entry != null) {
			return new VectorResult(id, entry.count(), 0, 0, entry.vec());
		}

		PreparedStatement s = select_by_rowid_stmt.prepareIfNeeded(
			() -> db.prepareStatement("SELECT id,count,vec FROM " + TABLE_NAME + " WHERE id = ?"));
		s.setLong(1, id);
		try (ResultSet rs = s.executeQuery()) {
			if (!rs.next()) {
				throw new SQLException("Bad vector table rowid");
			}
			char[] vectorDecodeBuffer = Base64VectorFactory.allocateBuffer();
			VectorResult rowres;
			try {
				rowres = new VectorResult();
				rowres.vectorid = rs.getLong(1);
				rowres.hitcount = rs.getInt(2);
				Reader r = new StringReader(rs.getString(3));
				rowres.vec = vectorFactory.restoreVectorFromBase64(r, vectorDecodeBuffer);
			}
			catch (final IOException e) {
				throw new SQLException(e.getMessage()); // unexpected for StringReader
			}
			return rowres;
		}
	}
Get vector details which correspond to specified vector ID
@param id vector ID
@return vector details
@throws SQLException if error occurs
Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/file/H2VectorTable.java