Class ParsedStmtOp

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

public class ParsedStmtOp
extends java.lang.Object
  • Constructor Summary

    Constructors 
    Constructor Description
    ParsedStmtOp​(io.nosqlbench.engine.api.activityconfig.yaml.OpTemplate optpl)
    Construct a new ParsedStatement from the provided stmtDef and anchor token.
  • Method Summary

    Modifier and Type Method Description
    java.util.Map<java.lang.String,​java.lang.String> getBindings()  
    java.util.List<io.nosqlbench.virtdata.core.templates.BindPoint> getBindPoints()  
    java.util.Set<java.lang.String> getMissingBindings()
    Returns a list of binding names which were referenced in either
    java.lang.String getName()  
    io.nosqlbench.nb.api.config.params.Element getParamReader()  
    java.lang.String getPositionalStatement​(java.util.function.Function<java.lang.String,​java.lang.String> tokenMapper)
    Return the statement that can be used as-is by any driver specific version.
    java.lang.String getStmt()  
    java.util.Map<java.lang.String,​java.lang.String> getTags()  
    boolean hasError()  
    ParsedStmtOp orError()  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ParsedStmtOp

      public ParsedStmtOp​(io.nosqlbench.engine.api.activityconfig.yaml.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 java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • hasError

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

      public java.util.Set<java.lang.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 java.lang.String getPositionalStatement​(java.util.function.Function<java.lang.String,​java.lang.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 java.lang.String getName()
      Returns:
      the statement name from the enclosed OpTemplate
    • getStmt

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

      public java.util.Map<java.lang.String,​java.lang.String> getTags()
      Returns:
      the tags from the enclosed OpTemplate
    • getBindings

      public java.util.Map<java.lang.String,​java.lang.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 java.util.List<io.nosqlbench.virtdata.core.templates.BindPoint> getBindPoints()