Examples of OQueryOperator


Examples of com.orientechnologies.orient.core.sql.operator.OQueryOperator

      return currentCondition;

    if (currentPos > -1 && text.charAt(currentPos) == ')')
      return currentCondition;

    final OQueryOperator nextOperator = extractConditionOperator();

    if (nextOperator.precedence > currentCondition.getOperator().precedence) {
      // SWAP ITEMS
      final OSQLFilterCondition subCondition = new OSQLFilterCondition(currentCondition.right, nextOperator);
      currentCondition.right = subCondition;
View Full Code Here

Examples of com.orientechnologies.orient.core.sql.operator.OQueryOperator

      // END OF TEXT
      return null;

    // EXTRACT ITEMS
    final Object left = extractConditionItem(1);
    final OQueryOperator oper = extractConditionOperator();
    final Object right = oper != null ? extractConditionItem(oper.expectedRightWords) : null;

    // CREATE THE CONDITION OBJECT
    return new OSQLFilterCondition(left, oper, right);
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.sql.operator.OQueryOperator

    if (searchInIndexTriples.isEmpty())
      return false;

    for (OSearchInIndexTriple indexTriple : searchInIndexTriples) {
      final OIndex idx = indexTriple.index.getInternal();
      final OQueryOperator operator = indexTriple.indexOperator;
      final Object key = indexTriple.key;

      final boolean indexCanBeUsedInEqualityOperators = (idx instanceof OIndexUnique || idx instanceof OIndexNotUnique);

      if (indexCanBeUsedInEqualityOperators && operator instanceof OQueryOperatorBetween) {
View Full Code Here

Examples of com.orientechnologies.orient.core.sql.operator.OQueryOperator

  private void analyzeQueryBranch(final OClass iSchemaClass, final OSQLFilterCondition iCondition,
      final List<OSearchInIndexTriple> iSearchInIndexTriples) {
    if (iCondition == null)
      return;

    final OQueryOperator operator = iCondition.getOperator();
    if (operator == null)
      if (iCondition.getLeft() != null && iCondition.getRight() == null) {
        analyzeQueryBranch(iSchemaClass, (OSQLFilterCondition) iCondition.getLeft(), iSearchInIndexTriples);
        return;
      } else {
        return;
      }

    final OIndexReuseType indexReuseType = operator.getIndexReuseType(iCondition.getLeft(), iCondition.getRight());
    if (indexReuseType.equals(OIndexReuseType.ANY_INDEX)) {
      analyzeQueryBranch(iSchemaClass, (OSQLFilterCondition) iCondition.getLeft(), iSearchInIndexTriples);
      analyzeQueryBranch(iSchemaClass, (OSQLFilterCondition) iCondition.getRight(), iSearchInIndexTriples);
    } else if (indexReuseType.equals(OIndexReuseType.INDEX_METHOD)) {
      if (!searchIndexedProperty(iSchemaClass, iCondition, iCondition.getLeft(), iSearchInIndexTriples))
View Full Code Here

Examples of com.orientechnologies.orient.core.sql.operator.OQueryOperator

      final Object right = compiledFilter.getRootCondition().getRight();
      final Object keyValue = OSQLHelper.getValue(right);

      Collection<OIdentifiable> result = null;
      final OQueryOperator indexOperator = compiledFilter.getRootCondition().getOperator();
      if (indexOperator instanceof OQueryOperatorBetween) {
        final Object[] values = (Object[]) compiledFilter.getRootCondition().getRight();

        if (projections != null && projections.size() == 1 && projections.keySet().iterator().next().equalsIgnoreCase("@rid")) {
          // SPECIAL CASE
View Full Code Here

Examples of com.orientechnologies.orient.core.sql.operator.OQueryOperator

    if (right instanceof OSQLFilterCondition)
      // ANALYSE RIGHT RECURSIVELY
      optimizeBranch(iCondition, (OSQLFilterCondition) right);

    final OQueryOperator oper = iCondition.getOperator();

    Object result = null;

    if (left instanceof OSQLFilterItemField & right instanceof OSQLFilterItemField) {
      if (((OSQLFilterItemField) left).getRoot().equals(((OSQLFilterItemField) right).getRoot())) {
View Full Code Here

Examples of com.orientechnologies.orient.core.sql.operator.OQueryOperator

      return currentCondition;

    if (currentPos > -1 && text.charAt(currentPos) == ')')
      return currentCondition;

    final OQueryOperator nextOperator = extractConditionOperator();

    if (nextOperator.precedence > currentCondition.getOperator().precedence) {
      // SWAP ITEMS
      final OSQLFilterCondition subCondition = new OSQLFilterCondition(currentCondition.right, nextOperator);
      currentCondition.right = subCondition;
View Full Code Here

Examples of com.orientechnologies.orient.core.sql.operator.OQueryOperator

      // END OF TEXT
      return null;

    // EXTRACT ITEMS
    final Object left = extractConditionItem(1);
    final OQueryOperator oper = extractConditionOperator();
    final Object right = oper != null ? extractConditionItem(oper.expectedRightWords) : null;

    // CREATE THE CONDITION OBJECT
    return new OSQLFilterCondition(left, oper, right);
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.sql.operator.OQueryOperator

      return currentCondition;

    if (currentPos > -1 && text.charAt(currentPos) == ')')
      return currentCondition;

    OQueryOperator nextOperator = extractConditionOperator();

    OSQLFilterCondition parentCondition = new OSQLFilterCondition(currentCondition, nextOperator);

    parentCondition.right = extractConditions(parentCondition);
View Full Code Here

Examples of com.orientechnologies.orient.core.sql.operator.OQueryOperator

    if (searchInIndexTriples.isEmpty())
      return false;

    for (OSearchInIndexTriple indexTriple : searchInIndexTriples) {
      final OIndex idx = indexTriple.index.getInternal();
      final OQueryOperator operator = indexTriple.indexOperator;
      final Object key = indexTriple.key;

      final boolean indexCanBeUsedInEqualityOperators = (idx instanceof OIndexUnique || idx instanceof OIndexNotUnique);

      if (indexCanBeUsedInEqualityOperators && operator instanceof OQueryOperatorBetween) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.