Class ParsedStmtOp

java.lang.Object
io.nosqlbench.engine.api.activityconfig.ParsedStmtOp

public class ParsedStmtOp extends Object
  • Constructor Details

    • ParsedStmtOp

      public ParsedStmtOp(OpTemplate optpl)
      Construct a new ParsedStatement from the provided stmtDef and anchor token.
      Parameters:
      optpl - An existing statement def as read from the YAML API.
  • Method Details

    • orError

      public ParsedStmtOp orError()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hasError

      public boolean hasError()
      Returns:
      true if the parsed statement is not usable.
    • getMissingBindings

      public Set<String> getMissingBindings()
      Returns a list of binding names which were referenced in either
      {anchor}
      or
      ?anchor
      form, but which were not present in the provided bindings map. If any binding names are present in the returned set, then this binding will not be usable.
      Returns:
      A list of binding names which were referenced but not defined*
    • getPositionalStatement

      public String getPositionalStatement(Function<String,String> tokenMapper)
      Return the statement that can be used as-is by any driver specific version. This uses the anchor token as provided to yield a version of the statement which contains positional anchors, but no named bindings.
      Parameters:
      tokenMapper - A function which maps the anchor name to the needed form in the callers driver context
      Returns:
      A driver or usage-specific format of the statement, with anchors
    • getName

      public String getName()
      Returns:
      the statement name from the enclosed OpTemplate
    • getStmt

      public String getStmt()
      Returns:
      the raw statement from the enclosed OpTemplate
    • getTags

      public Map<String,String> getTags()
      Returns:
      the tags from the enclosed OpTemplate
    • getBindings

      public Map<String,String> getBindings()
      Returns:
      the bindings from the enclosed OpTemplate
    • getParamReader

      public io.nosqlbench.nb.api.config.params.Element getParamReader()
      Returns:
      a params reader from the enclosed OpTemplate params map
    • getBindPoints

      public List<io.nosqlbench.virtdata.core.templates.BindPoint> getBindPoints()