ParseTiDBOmni parses SQL using omni/tidb's parser and returns an ast.List. This is the recommended entry point for new code that needs omni/tidb AST nodes. Callers that need a pre-split []base.ParsedStatement should use the registered base.ParseStatements with storepb.Engine_TIDB instead.
(sql string)
| 104 | // nodes. Callers that need a pre-split []base.ParsedStatement should use the |
| 105 | // registered base.ParseStatements with storepb.Engine_TIDB instead. |
| 106 | func ParseTiDBOmni(sql string) (*ast.List, error) { |
| 107 | return omniparser.Parse(sql) |
| 108 | } |
| 109 | |
| 110 | // GetOmniNode extracts the omni AST node from a base.AST interface. |
| 111 | // Returns the node and true if it is an *OmniAST, nil and false otherwise. |
no outgoing calls