public List<CategoryRecord> queryExecutableCategories(long exeid, int max)
		throws SQLException {

		if (exeid == 0) {
			throw new SQLException("ExecutableRecord does not have id");
		}

		PreparedStatement s =
			selectCategoriesStatement.prepareIfNeeded(() -> db.prepareStatement(SELECT_STMT));
		s.setInt(1, (int) exeid);
		try (ResultSet rs = s.executeQuery()) {
			List<CategoryRecord> catvec = new ArrayList<CategoryRecord>();
			extractCategoryRecords(rs, catvec, max);
			return catvec;
		}
	}
@param exeid the executable table id
@param max the max number of records to return
@return the list of category records
@throws SQLException if there is a problem creating or executing the query
Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/client/tables/ExeToCategoryTable.java