Documentation ¶
Index ¶
- func UnwrapFromSingleQuotes(inStr string) string
- func WrapInSingleQuotes(inStr string) string
- type ParamMarkerExpr
- type ValueExpr
- func (n *ValueExpr) Accept(v ast.Visitor) (ast.Node, bool)
- func (n *ValueExpr) Format(w io.Writer)
- func (n *ValueExpr) GetDatumString() string
- func (n *ValueExpr) GetProjectionOffset() int
- func (n *ValueExpr) Restore(ctx *format.RestoreCtx) error
- func (n *ValueExpr) SetProjectionOffset(offset int)
- func (n *ValueExpr) SetValue(res any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UnwrapFromSingleQuotes ¶
UnwrapFromSingleQuotes the reverse of WrapInSingleQuotes but also allows non-single quoted strings
func WrapInSingleQuotes ¶
WrapInSingleQuotes escapes single quotes and backslashs and adds single quotes around the string
Types ¶
type ParamMarkerExpr ¶
type ParamMarkerExpr struct { ValueExpr Offset int Order int InExecute bool // For "select ? as c from t group by c", the optimizer replaces the `c` in the by-clause to `group by ?`, // but this conversion conflicts with the original semantic. The original `group by c` means grouping by the column `c`, // while the converted `group by ?` means grouping by the `?-th` column in the select-list, for example, `group by 3` means // grouping the result by the 3rd column. // Use this flag to let the optimizer know whether `group by ?` is converted from this case and if it is, use this // marker as normal value instead of column index in the by-clause. UseAsValueInGbyByClause bool }
ParamMarkerExpr expression holds a place for another expression. Used in parsing prepare statement.
func (*ParamMarkerExpr) Format ¶
func (*ParamMarkerExpr) Format(_ io.Writer)
Format the ExprNode into a Writer.
func (*ParamMarkerExpr) Restore ¶
func (*ParamMarkerExpr) Restore(ctx *format.RestoreCtx) error
Restore implements Node interface.
func (*ParamMarkerExpr) SetOrder ¶
func (n *ParamMarkerExpr) SetOrder(order int)
SetOrder implements the ast.ParamMarkerExpr interface.
type ValueExpr ¶
ValueExpr is the simple value expression.
func (*ValueExpr) GetDatumString ¶
GetDatumString implements the ast.ValueExpr interface.
func (*ValueExpr) GetProjectionOffset ¶
GetProjectionOffset returns ValueExpr.projectionOffset.
func (*ValueExpr) Restore ¶
func (n *ValueExpr) Restore(ctx *format.RestoreCtx) error
Restore implements Node interface.
func (*ValueExpr) SetProjectionOffset ¶
SetProjectionOffset sets ValueExpr.projectionOffset for logical plan builder.