(sql: &str)
| 2356 | |
| 2357 | #[sqlfunc] |
| 2358 | fn redact_sql(sql: &str) -> Result<String, EvalError> { |
| 2359 | let stmts = mz_sql_parser::parser::parse_statements(sql) |
| 2360 | .map_err(|e| EvalError::RedactError(e.to_string().into()))?; |
| 2361 | match stmts.len() { |
| 2362 | 1 => Ok(stmts[0].ast.to_ast_string_redacted()), |
| 2363 | n => Err(EvalError::RedactError( |
| 2364 | format!("expected a single statement, found {n}").into(), |
| 2365 | )), |
| 2366 | } |
| 2367 | } |
| 2368 | |
| 2369 | #[sqlfunc(propagates_nulls = true)] |
| 2370 | fn starts_with(a: &str, b: &str) -> bool { |
nothing calls this directly
no test coverage detected