()
| 91 | } |
| 92 | |
| 93 | func newTiDBParser() *tidbparser.Parser { |
| 94 | p := tidbparser.New() |
| 95 | |
| 96 | // To support MySQL8 window function syntax. |
| 97 | // See https://github.com/bytebase/bytebase/issues/175. |
| 98 | p.EnableWindowFunc(true) |
| 99 | |
| 100 | return p |
| 101 | } |
| 102 | |
| 103 | // ParseTiDB parses the given SQL statement and returns the AST. |
| 104 | func ParseTiDB(sql string, charset string, collation string) ([]ast.StmtNode, error) { |
no outgoing calls
no test coverage detected