Parse a SQL string into a list of raw AST statements. Returns `Err(())` on any parse failure. Used only for cache reconstruction where detailed error reporting is unnecessary — a parse failure simply means the cache entry is stale.
(sql: &str)
| 1067 | /// where detailed error reporting is unnecessary — a parse failure simply |
| 1068 | /// means the cache entry is stale. |
| 1069 | fn parse_sql(sql: &str) -> Result<Vec<Statement<Raw>>, ()> { |
| 1070 | mz_sql_parser::parser::parse_statements_with_limit(sql) |
| 1071 | .map_err(|_| ())? |
| 1072 | .map(|stmts| stmts.into_iter().map(|stmt| stmt.ast).collect()) |
| 1073 | .map_err(|_| ()) |
| 1074 | } |
| 1075 | |
| 1076 | /// Parse a SQL string that must contain exactly one statement. |
| 1077 | /// |
no test coverage detected