generatedexpr

package
v1.1.0-beta.0...-e2f85cd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseExpression

func ParseExpression(expr string) (node ast.ExprNode, err error)

ParseExpression parses an ExprNode from a string. When TiDB loads infoschema from TiKV, `GeneratedExprString` of `ColumnInfo` is a string field, so we need to parse it into ast.ExprNode. This function is for that.

func ParseExpressionWithSQLMode

func ParseExpressionWithSQLMode(expr string, sqlMode mysql.SQLMode) (node ast.ExprNode, err error)

ParseExpressionWithSQLMode parses an ExprNode using the specified SQL mode. The SQL mode is part of the expression's parsing semantics for expressions restored from metadata, such as materialized view schedules.

func SimpleResolveName

func SimpleResolveName(node ast.ExprNode, tblInfo *model.TableInfo) (ast.ExprNode, error)

SimpleResolveName resolves all column names in the expression node.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL