Class DSLParserImpl

java.lang.Object
com.aerospike.dsl.impl.DSLParserImpl
All Implemented Interfaces:
DSLParser

public class DSLParserImpl extends Object implements DSLParser
  • Constructor Details

    • DSLParserImpl

      public DSLParserImpl()
  • Method Details

    • parseExpression

      @Beta public ParsedExpression parseExpression(ExpressionContext expressionContext)
      Description copied from interface: DSLParser
      Parse DSL string into ParsedExpression.

      Examples:
      Path element
      $.binName Bin “binName”
      a Map key “a”
      '1' Map key (String) “1”
      1 Map key 1
      {1} Map index 1
      {=1} Map value (int) 1
      {=bb} Map value “bb”
      {='1'} Map value (String) “1”
      {#1} Map rank 1
      [1] List index 1
      [=1] List value 1
      [#1] List rank 1

      A nested element
      $.mapBinName.k [mapBinName -> mapKey("a")]
      $.mapBinName.a.aa.aaa [mapBinName -> mapKey("a") -> mapKey("aa") -> mapKey("aaa")]
      $.mapBinName.a.55 [mapBinName -> mapKey("a") -> mapKey(55)]
      $.listBinName.[1].aa [listBinName -> listIndex(1) -> mapKey("aa")]
      $.mapBinName.ab.cd.[-1].'10' [mapBinName -> mapKey("ab") -> mapKey("cd") -> listIndex(-1) -> mapKey("10")]
      Specified by:
      parseExpression in interface DSLParser
      Parameters:
      expressionContext - ExpressionContext containing input string of dot separated elements. If the input string has placeholders, matching values must be provided within input too
      Returns:
      ParsedExpression object
    • parseExpression

      @Beta public ParsedExpression parseExpression(ExpressionContext expressionContext, IndexContext indexContext)
      Description copied from interface: DSLParser
      Parse DSL string into ParsedExpression.

      Examples:
      Path element
      $.binName Bin “binName”
      a Map key “a”
      '1' Map key (String) “1”
      1 Map key 1
      {1} Map index 1
      {=1} Map value (int) 1
      {=bb} Map value “bb”
      {='1'} Map value (String) “1”
      {#1} Map rank 1
      [1] List index 1
      [=1] List value 1
      [#1] List rank 1

      A nested element
      $.mapBinName.k [mapBinName -> mapKey("a")]
      $.mapBinName.a.aa.aaa [mapBinName -> mapKey("a") -> mapKey("aa") -> mapKey("aaa")]
      $.mapBinName.a.55 [mapBinName -> mapKey("a") -> mapKey(55)]
      $.listBinName.[1].aa [listBinName -> listIndex(1) -> mapKey("aa")]
      $.mapBinName.ab.cd.[-1].'10' [mapBinName -> mapKey("ab") -> mapKey("cd") -> listIndex(-1) -> mapKey("10")]
      Specified by:
      parseExpression in interface DSLParser
      Parameters:
      expressionContext - ExpressionContext containing input string of dot separated elements. If the input string has placeholders, matching values must be provided within input too
      indexContext - Class containing namespace and collection of Index objects that represent existing secondary indexes. Required for creating Filter. Can be null
      Returns:
      ParsedExpression object
    • parseCTX

      @Beta public com.aerospike.client.cdt.CTX[] parseCTX(String pathToCtx)
      Description copied from interface: DSLParser
      Parse DSL path with CDT context into an array of CTX objects. The argument must represent a path with context, e.g. $.listBinName.[1], $.mapBinName.ab etc.
      Specified by:
      parseCTX in interface DSLParser
      Parameters:
      pathToCtx - Input string representing path with CDT context, must not be null
      Returns:
      Array of CTX