public class ExprParser
extends java.lang.Object
Constructor and Description |
---|
ExprParser(java.lang.String s)
Constructor.
|
ExprParser(java.lang.String s,
boolean allowRelationalColumns)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
MysqlxExpr.Expr |
documentField()
Parse a document field.
|
java.util.List<MysqlxExpr.DocumentPathItem> |
documentPath()
Parse a JSON-style document path, like WL#7909, but prefix by @.
|
java.util.Map<java.lang.String,java.lang.Integer> |
getPlaceholderNameToPositionMap()
Get a mapping of parameter names to positions.
|
int |
getPositionalPlaceholderCount()
Return the number of positional placeholders in the expression.
|
MysqlxExpr.Expr |
parse()
Parse the entire string as an expression.
|
java.util.List<MysqlxCrud.Projection> |
parseDocumentProjection()
Parse a document projection which is similar to SELECT but with document paths as the target alias.
|
java.util.List<MysqlxExpr.Expr> |
parseExprList()
Parse a list of expressions used for GROUP BY.
|
java.util.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.Column |
parseTableInsertField()
Parse an INSERT field name.
|
java.util.List<MysqlxCrud.Projection> |
parseTableSelectProjection()
Parse a SELECT projection which is a comma-separated list of expressions, each optionally suffixed with a target alias.
|
MysqlxExpr.ColumnIdentifier |
parseTableUpdateField()
Parse an UPDATE field which can include can document paths.
|
public ExprParser(java.lang.String s)
s
- expression string to parsepublic ExprParser(java.lang.String s, boolean allowRelationalColumns)
s
- expression string to parseallowRelationalColumns
- are relational columns identifiers allowed?public java.util.List<MysqlxExpr.DocumentPathItem> documentPath()
MysqlxExpr.DocumentPathItem
objectspublic MysqlxExpr.Expr documentField()
MysqlxExpr.Expr
public MysqlxExpr.Expr parse()
public java.util.List<MysqlxCrud.Order> parseOrderSpec()
MysqlxCrud.Order
objectspublic java.util.List<MysqlxCrud.Projection> parseTableSelectProjection()
MysqlxCrud.Projection
objectspublic MysqlxCrud.Column parseTableInsertField()
Column
public MysqlxExpr.ColumnIdentifier parseTableUpdateField()
MysqlxExpr.ColumnIdentifier
public java.util.List<MysqlxCrud.Projection> parseDocumentProjection()
MysqlxCrud.Projection
objectspublic java.util.List<MysqlxExpr.Expr> parseExprList()
MysqlxExpr.Expr
objectspublic int getPositionalPlaceholderCount()
public java.util.Map<java.lang.String,java.lang.Integer> getPlaceholderNameToPositionMap()