public void pushBindArgument(int i) { push(new CompiledBindArgument(i)); }
private Integer evaluateLimitValue(Object[] bindArguments) throws FunctionDomainException, TypeMismatchException, NameResolutionException, QueryInvocationTargetException { Integer limitValue = -1; if (this.limit != null) { if (this.limit instanceof CompiledBindArgument) { limitValue = (Integer) ((CompiledBindArgument) this.limit).evaluate(bindArguments); } else { // Assume limit is a compiled literal which does not need a context limitValue = (Integer) this.limit.evaluate(null); } } return limitValue; }
break; case QUERY_PARAM: right = ((CompiledBindArgument) _right).getSavedPdxString(context); break; case FUNCTION: break; case QUERY_PARAM: left = ((CompiledBindArgument) _left).getSavedPdxString(context); break; case FUNCTION:
break; case OQLLexerTokenTypes.QUERY_PARAM: right = ((CompiledBindArgument) key).getSavedPdxString(context); break; case CompiledValue.FUNCTION:
@Test public void whenLeafIsNotIndentifierThenHasIdentifierAtLeafMustReturnFalse() { CompiledValue compiledValue1 = new CompiledBindArgument(1); CompiledValue compiledValue2 = new CompiledBindArgument(1); CompiledIndexOperation compiledIndexOperation = new CompiledIndexOperation(compiledValue1, compiledValue2); CompiledPath compiledPath = new CompiledPath(compiledIndexOperation, "test"); assertFalse(compiledPath.hasIdentifierAtLeafNode()); }
Object rgn; CompiledBindArgument cba = (CompiledBindArgument) startVal; if ((rgn = cba.evaluate(this)) instanceof Region) { this.indpndtItrToRgnMap.put(itr, rgnPath = ((Region) rgn).getFullPath());
CompiledValue newCollExpr = new CompiledPath(new CompiledBindArgument(1), "entries"); this.additionalProj = new CompiledIndexOperation(new CompiledBindArgument(1), (CompiledValue) reconstruct.get(1), returnEntryForRegionCollection); this.isFirstIteratorRegionEntry = true; this.additionalProj = new CompiledIndexOperation(new CompiledBindArgument(1), (CompiledValue) reconstruct.get(1), returnEntryForRegionCollection); this.isFirstIteratorRegionEntry = true; newCollExpr = new CompiledIndexOperation(new CompiledBindArgument(1), (CompiledValue) reconstruct.get(1), returnEntryForRegionCollection); } else if (methodName.equals("toList") || methodName.equals("toArray")) {
CompiledValue def = iterDef.getCollectionExpr(); if (def instanceof CompiledRegion) { CompiledBindArgument bindArg = new CompiledBindArgument(1); CompiledIteratorDef newDef = new CompiledIteratorDef(iterDef.getName(), null, bindArg); retValues[0] = def.evaluate(this.context); cv = new CompiledBindArgument(1); int len = reconstruct.size(); for (int j = 0; j < len; ++j) {
/** * Returns parameterized query used by the server. This method replaces Region name with $1 and if * type is not specified in the query, looks for type from cqattributes and appends into the * query. * * @return String modified query. */ private Query constructServerSideQuery() throws QueryException { InternalCache cache = cqService.getInternalCache(); DefaultQuery locQuery = (DefaultQuery) cache.getLocalQueryService().newQuery(this.queryString); CompiledSelect select = locQuery.getSimpleSelect(); CompiledIteratorDef from = (CompiledIteratorDef) select.getIterators().get(0); // WARNING: ASSUMES QUERY WAS ALREADY VALIDATED FOR PROPER "FORM" ON CLIENT; // THIS VALIDATION WILL NEED TO BE DONE ON THE SERVER FOR NATIVE CLIENTS, // BUT IS NOT DONE HERE FOR JAVA CLIENTS. // The query was already checked on the client that the sole iterator is a // CompiledRegion this.regionName = ((CompiledRegion) from.getCollectionExpr()).getRegionPath(); from.setCollectionExpr(new CompiledBindArgument(1)); return locQuery; }
new CompiledAggregateFunction(compiledValue1, 13), new CompiledAddition(compiledValue1, compiledValue2, 13), new CompiledBindArgument(1), new CompiledComparison(compiledValue1, compiledValue2, 13), new CompiledConstruction(Object.class, new ArrayList()),