类 ExprParser


  • public class ExprParser
    extends Object
    Expression parser for X protocol.
    • 构造器详细资料

      • ExprParser

        public ExprParser​(String s)
        Constructor.
        参数:
        s - expression string to parse
      • ExprParser

        public ExprParser​(String s,
                          boolean allowRelationalColumns)
        Constructor.
        参数:
        s - expression string to parse
        allowRelationalColumns - are relational columns identifiers allowed?
    • 方法详细资料

      • parse

        public MysqlxExpr.Expr parse()
        Parse the entire string as an expression.
        返回:
        an X protocol expression tree
      • parseOrderSpec

        public List<MysqlxCrud.Order> parseOrderSpec()
        Parse an ORDER BY specification which is a comma-separated list of expressions, each may be optionally suffixed by ASC/DESC.
        返回:
        list of MysqlxCrud.Order objects
      • parseTableSelectProjection

        public List<MysqlxCrud.Projection> parseTableSelectProjection()
        Parse a SELECT projection which is a comma-separated list of expressions, each optionally suffixed with a target alias.
        返回:
        list of MysqlxCrud.Projection objects
      • parseDocumentProjection

        public List<MysqlxCrud.Projection> parseDocumentProjection()
        Parse a document projection which is similar to SELECT but with document paths as the target alias.
        返回:
        list of MysqlxCrud.Projection objects
      • getPositionalPlaceholderCount

        public int getPositionalPlaceholderCount()
        Return the number of positional placeholders in the expression.
        返回:
        the number of positional placeholders in the expression
      • getPlaceholderNameToPositionMap

        public Map<String,​Integer> getPlaceholderNameToPositionMap()
        Get a mapping of parameter names to positions.
        返回:
        a mapping of parameter names to positions.