ParseStatements parses the SQL statement and returns ParsedStatement objects with both text and AST. This is the new unified parsing function.
(engine storepb.Engine, statement string)
| 290 | // ParseStatements parses the SQL statement and returns ParsedStatement objects with both text and AST. |
| 291 | // This is the new unified parsing function. |
| 292 | func ParseStatements(engine storepb.Engine, statement string) ([]ParsedStatement, error) { |
| 293 | f, ok := statementParsers[engine] |
| 294 | if !ok { |
| 295 | return nil, errors.Errorf("engine %s is not supported for ParseStatements", engine) |
| 296 | } |
| 297 | return f(statement) |
| 298 | } |
| 299 | |
| 300 | func RegisterGetStatementTypes(engine storepb.Engine, f GetStatementTypesFunc) { |
| 301 | mux.Lock() |