GetStatementTypes returns the types of statements in the ASTs.
(engine storepb.Engine, asts []AST)
| 308 | |
| 309 | // GetStatementTypes returns the types of statements in the ASTs. |
| 310 | func GetStatementTypes(engine storepb.Engine, asts []AST) ([]storepb.StatementType, error) { |
| 311 | f, ok := statementTypeGetters[engine] |
| 312 | if !ok { |
| 313 | return nil, errors.Errorf("engine %s is not supported", engine) |
| 314 | } |
| 315 | return f(asts) |
| 316 | } |
| 317 | |
| 318 | // IsAllDML checks if all statements are DML (INSERT, UPDATE, DELETE). |
| 319 | // Returns false for unsupported engines or parse errors (conservative approach). |
no test coverage detected