public OFromClause copy() { OFromClause result= new OFromClause(-1); result.item = item.copy(); return result; }
private OSelectStatement buildSelectStatement(String className, OWhereClause oWhereClause) { OSelectStatement stm = new OSelectStatement(-1); stm.whereClause = oWhereClause; stm.target = new OFromClause(-1); stm.target.item = new OFromItem(-1); stm.target.item.identifier = new OIdentifier(className); return stm; }
private void handleSource(OUpdateExecutionPlan result, OCommandContext ctx, OFromItem source, boolean profilingEnabled) { OSelectStatement sourceStatement = new OSelectStatement(-1); sourceStatement.setTarget(new OFromClause(-1)); sourceStatement.getTarget().setItem(source); OSelectExecutionPlanner planner = new OSelectExecutionPlanner(sourceStatement); result.chain(new SubQueryStep(planner.createExecutionPlan(ctx, profilingEnabled, false), ctx, ctx, profilingEnabled)); } }
@Override public void deserialize(OResult fromResult) { try { OExecutionStepInternal.basicDeserialize(fromResult, this); functionCondition = new OBinaryCondition(-1); functionCondition.deserialize(fromResult.getProperty("functionCondition ")); queryTarget = new OFromClause(-1); queryTarget.deserialize(fromResult.getProperty("functionCondition ")); } catch (Exception e) { throw OException.wrapException(new OCommandExecutionException(""), e); } } }
private OSelectStatement createSelectStatement(String targetClass, String targetCluster, ORid targetRid, OWhereClause filter) { OSelectStatement prefetchStm = new OSelectStatement(-1); prefetchStm.setWhereClause(filter); OFromClause from = new OFromClause(-1); OFromItem fromItem = new OFromItem(-1); if (targetRid != null) { fromItem.setRids(Collections.singletonList(targetRid)); } else if (targetClass != null) { fromItem.setIdentifier(new OIdentifier(targetClass)); } else if (targetCluster != null) { fromItem.setCluster(new OCluster(targetCluster)); } from.setItem(fromItem); prefetchStm.setTarget(from); return prefetchStm; }
OFromClause from = new OFromClause(-1); OFromItem item = new OFromItem(-1); from.item = item;
OWhereClause where = aliasFilters.get(patternNode.alias); OSelectStatement select = new OSelectStatement(-1); select.setTarget(new OFromClause(-1)); select.getTarget().setItem(new OFromItem(-1)); if (clazz != null) {
final public OFromClause FromClause() throws ParseException { OFromClause jjtn000 = new OFromClause(JJTFROMCLAUSE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000);
private OSelectStatement indexChainToStatement(OModifier modifier, OClass clazz, OExpression right, OCommandContext ctx) { OClass queryClass = clazz; OSelectStatement result = new OSelectStatement(-1); result.target = new OFromClause(-1); result.target.setItem(new OFromItem(-1)); result.target.getItem().identifier = new OIdentifier(queryClass.getName()); result.whereClause = new OWhereClause(-1); OBinaryCondition base = new OBinaryCondition(-1); result.whereClause.baseExpression = new ONotBlock(-1); ((ONotBlock) result.whereClause.baseExpression).sub = base; ((ONotBlock) result.whereClause.baseExpression).negate = false; base.left = new OExpression(-1); base.left.mathExpression = new OBaseExpression(-1); ((OBaseExpression) base.left.mathExpression).identifier = new OBaseIdentifier(modifier.suffix.identifier); ((OBaseExpression) base.left.mathExpression).modifier = modifier.next == null ? null : modifier.next.copy(); base.operator = new OEqualsCompareOperator(-1); base.right = right.copy(); return result; } }
result.chain(new EmptyStep(ctx, profilingEnabled));//nothing to return } else if (paramValue instanceof OClass) { OFromClause from = new OFromClause(-1); OFromItem item = new OFromItem(-1); from.setItem(item); } else if (paramValue instanceof String) { OFromClause from = new OFromClause(-1); OFromItem item = new OFromItem(-1); from.setItem(item);
result.chain(new EmptyStep(ctx, profilingEnabled));//nothing to return } else if (paramValue instanceof OClass) { OFromClause from = new OFromClause(-1); OFromItem item = new OFromItem(-1); from.setItem(item); } else if (paramValue instanceof String) { OFromClause from = new OFromClause(-1); OFromItem item = new OFromItem(-1); from.setItem(item);
public ODeleteExecutionPlan createExecutionPlan(OCommandContext ctx, boolean enableProfiling) { ODeleteExecutionPlan result = new ODeleteExecutionPlan(ctx); if (leftExpression != null || rightExpression != null) { handleGlobalLet(result, new OIdentifier("$__ORIENT_DELETE_EDGE_fromV"), leftExpression, ctx, enableProfiling); handleGlobalLet(result, new OIdentifier("$__ORIENT_DELETE_EDGE_toV"), rightExpression, ctx, enableProfiling); handleFetchFromTo(result, ctx, "$__ORIENT_DELETE_EDGE_fromV", "$__ORIENT_DELETE_EDGE_toV", className, targetClusterName, enableProfiling); handleWhere(result, ctx, whereClause, enableProfiling); } else if (whereClause != null) { OFromClause fromClause = new OFromClause(-1); OFromItem item = new OFromItem(-1); if (className == null) { item.setIdentifier(new OIdentifier("E")); } else { item.setIdentifier(className); } fromClause.setItem(item); handleTarget(result, ctx, fromClause, this.whereClause, enableProfiling); } else { handleTargetClass(result, ctx, className, enableProfiling); handleTargetCluster(result, ctx, targetClusterName, enableProfiling); handleTargetRids(result, ctx, rids, enableProfiling); } handleLimit(result, ctx, this.limit, enableProfiling); handleCastToEdge(result, ctx, enableProfiling); handleDelete(result, ctx, enableProfiling); handleReturn(result, ctx, enableProfiling); return result; }
public void deserialize(OResult fromResult) { if (fromResult.getProperty("target") != null) { target = new OFromClause(-1); target.deserialize(fromResult.getProperty("target"));