(
text: &str,
regexp: &Regex,
temp_storage: &'a RowArena,
)
| 2321 | } |
| 2322 | |
| 2323 | fn regexp_split_to_array_re<'a>( |
| 2324 | text: &str, |
| 2325 | regexp: &Regex, |
| 2326 | temp_storage: &'a RowArena, |
| 2327 | ) -> Result<Datum<'a>, EvalError> { |
| 2328 | let found = mz_regexp::regexp_split_to_array(text, regexp); |
| 2329 | let mut row = Row::default(); |
| 2330 | let mut packer = row.packer(); |
| 2331 | packer.try_push_array( |
| 2332 | &[ArrayDimension { |
| 2333 | lower_bound: 1, |
| 2334 | length: found.len(), |
| 2335 | }], |
| 2336 | found.into_iter().map(Datum::String), |
| 2337 | )?; |
| 2338 | Ok(temp_storage.push_unary_row(row)) |
| 2339 | } |
| 2340 | |
| 2341 | #[sqlfunc(propagates_nulls = true)] |
| 2342 | fn pretty_sql<'a>(sql: &str, width: i32, temp_storage: &'a RowArena) -> Result<&'a str, EvalError> { |
no test coverage detected