Examples of OSQLFunctionRuntime


Examples of com.orientechnologies.orient.core.sql.functions.OSQLFunctionRuntime

    if (beginParenthesis > -1 && (separator == -1 || separator > beginParenthesis)) {
      final int endParenthesis = iWord.indexOf(OStringSerializerHelper.PARENTHESIS_END, beginParenthesis);

      if (endParenthesis > -1 && Character.isLetter(iWord.charAt(0)))
        // FUNCTION: CREATE A RUN-TIME CONTAINER FOR IT TO SAVE THE PARAMETERS
        return new OSQLFunctionRuntime(iCommand, iWord);
    }

    return null;
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.sql.functions.OSQLFunctionRuntime

      // NESTED CONDITION: EVALUATE IT RECURSIVELY
      return ((OSQLFilterCondition) iValue).evaluate(iRecord);

    if (iValue instanceof OSQLFunctionRuntime) {
      // STATELESS FUNCTION: EXECUTE IT
      final OSQLFunctionRuntime f = (OSQLFunctionRuntime) iValue;
      return f.execute(iRecord);
    }

    // SIMPLE VALUE: JUST RETURN IT
    return iValue;
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.sql.functions.OSQLFunctionRuntime

      Object value;
      for (Entry<String, Object> projection : projections.entrySet()) {
        if (projection.getValue() instanceof OSQLFilterItemField)
          value = ((OSQLFilterItemField) projection.getValue()).getValue(doc);
        else if (projection.getValue() instanceof OSQLFunctionRuntime) {
          final OSQLFunctionRuntime f = (OSQLFunctionRuntime) projection.getValue();
          canExcludeResult = f.filterResult();
          value = f.execute(doc);
        } else
          value = projection.getValue();

        if (value != null)
          result.field(projection.getKey(), value);
View Full Code Here

Examples of com.orientechnologies.orient.core.sql.functions.OSQLFunctionRuntime

    }

    if (anyFunctionAggregates) {
      for (Entry<String, Object> projection : projections.entrySet()) {
        if (projection.getValue() instanceof OSQLFunctionRuntime) {
          final OSQLFunctionRuntime f = (OSQLFunctionRuntime) projection.getValue();
          f.setResult(index.getSize());
        }
      }
    }
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.sql.functions.OSQLFunctionRuntime

      final ODocument result = new ODocument(database).setOrdered(true);
      for (Entry<String, Object> projection : projections.entrySet()) {
        if (projection.getValue() instanceof OSQLFilterItemField)
          value = ((OSQLFilterItemField) projection.getValue()).getValue(result);
        else if (projection.getValue() instanceof OSQLFunctionRuntime) {
          final OSQLFunctionRuntime f = (OSQLFunctionRuntime) projection.getValue();
          value = f.getResult();
        } else
          value = projection.getValue();

        result.field(projection.getKey(), value);
      }
View Full Code Here

Examples of com.orientechnologies.orient.core.sql.functions.OSQLFunctionRuntime

      Object value;
      for (Entry<String, Object> projection : projections.entrySet()) {
        if (projection.getValue() instanceof OSQLFilterItemField)
          value = ((OSQLFilterItemField) projection.getValue()).getValue(doc);
        else if (projection.getValue() instanceof OSQLFunctionRuntime) {
          final OSQLFunctionRuntime f = (OSQLFunctionRuntime) projection.getValue();
          canExcludeResult = f.filterResult();
          value = f.execute(doc);
        } else
          value = projection.getValue();

        if (value != null)
          result.field(projection.getKey(), value);
View Full Code Here

Examples of com.orientechnologies.orient.core.sql.functions.OSQLFunctionRuntime

        }
    } else {
      if (anyFunctionAggregates) {
        for (Entry<String, Object> projection : projections.entrySet()) {
          if (projection.getValue() instanceof OSQLFunctionRuntime) {
            final OSQLFunctionRuntime f = (OSQLFunctionRuntime) projection.getValue();
            f.setResult(index.getSize());
          }
        }
      }
    }
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.sql.functions.OSQLFunctionRuntime

      final ODocument result = new ODocument(database);
      for (Entry<String, Object> projection : projections.entrySet()) {
        if (projection.getValue() instanceof OSQLFilterItemField)
          value = ((OSQLFilterItemField) projection.getValue()).getValue(result);
        else if (projection.getValue() instanceof OSQLFunctionRuntime) {
          final OSQLFunctionRuntime f = (OSQLFunctionRuntime) projection.getValue();
          value = f.getResult();
        } else
          value = projection.getValue();

        result.field(projection.getKey(), value);
      }
View Full Code Here

Examples of com.orientechnologies.orient.core.sql.functions.OSQLFunctionRuntime

      for (int i = 0; i < funcParamsText.size(); ++i) {
        funcParams[i] = OSQLHelper.parseValue(database, iCommand, funcParamsText.get(i));
      }

      // FUNCTION: CRETAE A RUN-TIME CONTAINER FOR IT TO SAVE THE PARAMETERS
      return new OSQLFunctionRuntime(function, funcParams);
    }

    return null;
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.sql.functions.OSQLFunctionRuntime

      // NESTED CONDITION: EVALUATE IT RECURSIVELY
      return ((OSQLFilterCondition) iValue).evaluate(iRecord);

    if (iValue instanceof OSQLFunctionRuntime) {
      // STATELESS FUNCTION: EXECUTE IT
      final OSQLFunctionRuntime f = (OSQLFunctionRuntime) iValue;
      return f.execute(iRecord);
    }

    // SIMPLE VALUE: JUST RETURN IT
    return iValue;
  }
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.