/** * Returns an unmodifiable Set containing the Region names which are present in the Query. A * region which is associated with the query as a bind parameter will not be included in the list. * The Region names returned by the query do not indicate anything about the state of the region * or whether the region actually exists in the GemfireCache etc. * * @param parameters the parameters to be passed in to the query when executed * @return Unmodifiable List containing the region names. */ public Set<String> getRegionsInQuery(Object[] parameters) { Set<String> regions = new HashSet<>(); this.compiledQuery.getRegionsInQuery(regions, parameters); return Collections.unmodifiableSet(regions); }
@Override public void getRegionsInQuery(Set regionsInQuery, Object[] parameters) { for (Iterator itr = getChildren().iterator(); itr.hasNext();) { CompiledValue v = (CompiledValue) itr.next(); if (v == null) { throw new NullPointerException( String.format("Got null as a child from %s", this)); } v.getRegionsInQuery(regionsInQuery, parameters); } }
private Set<String> compileQuery(final String query) throws QueryInvalidException { QCompiler compiler = new QCompiler(); Set<String> regionsInQuery; try { CompiledValue compiledQuery = compiler.compileQuery(query); Set<String> regions = new HashSet<>(); compiledQuery.getRegionsInQuery(regions, null); regionsInQuery = Collections.unmodifiableSet(regions); return regionsInQuery; } catch (QueryInvalidException qe) { logger.error("{} Failed, Error {}", query, qe.getMessage(), qe); throw qe; } }
CompiledValue whereClause = select.getWhereClause(); if (whereClause != null) { whereClause.getRegionsInQuery(regions, parameters); if (!regions.isEmpty()) { throw new UnsupportedOperationException(
CompiledValue whereClause = select.getWhereClause(); if (whereClause != null) { whereClause.getRegionsInQuery(regions, parameters); if (!regions.isEmpty()) { throw new UnsupportedOperationException( Object[] rawProj = (Object[]) proj1; CompiledValue proj = (CompiledValue) rawProj[1]; proj.getRegionsInQuery(regions, parameters); if (!regions.isEmpty()) { throw new UnsupportedOperationException(
CompiledValue compiledQuery = compiler.compileQuery(query); Set<String> regions = new HashSet<>(); compiledQuery.getRegionsInQuery(regions, null);