类 ExprParser
- java.lang.Object
-
- com.mysql.cj.xdevapi.ExprParser
-
public class ExprParser extends Object
Expression parser for X protocol.
-
-
构造器概要
构造器 构造器 说明 ExprParser(String s)Constructor.ExprParser(String s, boolean allowRelationalColumns)Constructor.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 MysqlxExpr.ExprdocumentField()Parse a document field.List<MysqlxExpr.DocumentPathItem>documentPath()Parse a JSON-style document path, like WL#7909, but prefix by @. instead of $.Map<String,Integer>getPlaceholderNameToPositionMap()Get a mapping of parameter names to positions.intgetPositionalPlaceholderCount()Return the number of positional placeholders in the expression.MysqlxExpr.Exprparse()Parse the entire string as an expression.List<MysqlxCrud.Projection>parseDocumentProjection()Parse a document projection which is similar to SELECT but with document paths as the target alias.List<MysqlxExpr.Expr>parseExprList()Parse a list of expressions used for GROUP BY.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.MysqlxCrud.ColumnparseTableInsertField()Parse an INSERT field name.List<MysqlxCrud.Projection>parseTableSelectProjection()Parse a SELECT projection which is a comma-separated list of expressions, each optionally suffixed with a target alias.MysqlxExpr.ColumnIdentifierparseTableUpdateField()Parse an UPDATE field which can include can document paths.
-
-
-
方法详细资料
-
documentPath
public List<MysqlxExpr.DocumentPathItem> documentPath()
Parse a JSON-style document path, like WL#7909, but prefix by @. instead of $.- 返回:
- list of
MysqlxExpr.DocumentPathItemobjects
-
documentField
public MysqlxExpr.Expr documentField()
Parse a document field.- 返回:
MysqlxExpr.Expr
-
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.Orderobjects
-
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.Projectionobjects
-
parseTableInsertField
public MysqlxCrud.Column parseTableInsertField()
Parse an INSERT field name.
-
parseTableUpdateField
public MysqlxExpr.ColumnIdentifier parseTableUpdateField()
Parse an UPDATE field which can include can document paths.
-
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.Projectionobjects
-
parseExprList
public List<MysqlxExpr.Expr> parseExprList()
Parse a list of expressions used for GROUP BY.- 返回:
- list of
MysqlxExpr.Exprobjects
-
getPositionalPlaceholderCount
public int getPositionalPlaceholderCount()
Return the number of positional placeholders in the expression.- 返回:
- the number of positional placeholders in the expression
-
-