All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.orientechnologies.orient.core.sql.parser.OInPathItem Maven / Gradle / Ivy

There is a newer version: 3.2.32
Show newest version
/* Generated By:JJTree: Do not edit this line. OInPathItem.java Version 4.3 */
/* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=O,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
package com.orientechnologies.orient.core.sql.parser;

import com.orientechnologies.orient.core.sql.executor.OResult;
import java.util.Map;

public class OInPathItem extends OMatchPathItem {
  public OInPathItem(int id) {
    super(id);
  }

  public OInPathItem(OrientSql p, int id) {
    super(p, id);
  }

  @Override
  public void toString(Map params, StringBuilder builder) {
    builder.append("<-");
    boolean first = true;
    if (this.method.params != null) {
      for (OExpression exp : this.method.params) {
        if (!first) {
          builder.append(", ");
        }
        builder.append(exp.execute((OResult) null, null));
        first = false;
      }
    }
    builder.append("-");
    if (filter != null) {
      filter.toString(params, builder);
    }
  }

  @Override
  public void toGenericStatement(StringBuilder builder) {
    builder.append("<-");
    boolean first = true;
    if (this.method.params != null) {
      for (OExpression exp : this.method.params) {
        if (!first) {
          builder.append(", ");
        }
        exp.toGenericStatement(builder);
        first = false;
      }
    }
    builder.append("-");
    if (filter != null) {
      filter.toGenericStatement(builder);
    }
  }
}
/* JavaCC - OriginalChecksum=a1d80718c0b913e46b7b6a1c38e0dc98 (do not edit this line) */




© 2015 - 2024 Weber Informatics LLC | Privacy Policy