(
acl_items: Datum<'a>,
temp_storage: &'a RowArena,
)
| 3482 | } |
| 3483 | |
| 3484 | fn acl_explode<'a>( |
| 3485 | acl_items: Datum<'a>, |
| 3486 | temp_storage: &'a RowArena, |
| 3487 | ) -> Result<impl Iterator<Item = (Row, Diff)> + 'a, EvalError> { |
| 3488 | let acl_items = acl_items.unwrap_array(); |
| 3489 | let mut res = Vec::new(); |
| 3490 | for acl_item in acl_items.elements().iter() { |
| 3491 | if acl_item.is_null() { |
| 3492 | return Err(EvalError::AclArrayNullElement); |
| 3493 | } |
| 3494 | let acl_item = acl_item.unwrap_acl_item(); |
| 3495 | for privilege in acl_item.acl_mode.explode() { |
| 3496 | let row = [ |
| 3497 | Datum::UInt32(acl_item.grantor.0), |
| 3498 | Datum::UInt32(acl_item.grantee.0), |
| 3499 | Datum::String(temp_storage.push_string(privilege.to_string())), |
| 3500 | // GRANT OPTION is not implemented, so we hardcode false. |
| 3501 | Datum::False, |
| 3502 | ]; |
| 3503 | res.push((Row::pack_slice(&row), Diff::ONE)); |
| 3504 | } |
| 3505 | } |
| 3506 | Ok(res.into_iter()) |
| 3507 | } |
| 3508 | |
| 3509 | fn mz_acl_explode<'a>( |
| 3510 | mz_acl_items: Datum<'a>, |
no test coverage detected