Package dovetaildb.scriptbridge

Examples of dovetaildb.scriptbridge.ScriptFunction


   */
  public static Iter applyPostprecessingOptions(Iter i, Map<String,Object> options) {
    if (options == null) return i;
    int offset = 0;
    int limit = Integer.MAX_VALUE;
    ScriptFunction mapFn    = (ScriptFunction) options.get("map");
    ScriptFunction filterFn = (ScriptFunction) options.get("filter");
    i = new OptionsIter(i, offset, limit, mapFn, filterFn);
    ScriptFunction reduceFn = (ScriptFunction) options.get("reduce");
    if (reduceFn != null) {
      Object result = reduceIter(i, reduceFn);
      i = new LiteralIter(new Object[]{result});
    }
    return i;
View Full Code Here


   */
  public static Iter applyPostprecessingOptions(Iter i, Map<String,Object> options) {
    if (options == null) return i;
    int offset = 0;
    int limit = Integer.MAX_VALUE;
    ScriptFunction mapFn    = (ScriptFunction) options.get("map");
    ScriptFunction filterFn = (ScriptFunction) options.get("filter");
    i = new OptionsIter(i, offset, limit, mapFn, filterFn);
    ScriptFunction reduceFn = (ScriptFunction) options.get("reduce");
    if (reduceFn != null) {
      Object result = reduceIter(i, reduceFn);
      i = new LiteralIter(new Object[]{result});
    }
    return i;
View Full Code Here

TOP

Related Classes of dovetaildb.scriptbridge.ScriptFunction

Copyright © 2018 www.massapicom. 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.