(a: Datum<'a>, temp_storage: &'a RowArena)
| 78 | pub const MAX_STRING_FUNC_RESULT_BYTES: usize = 1024 * 1024 * 100; |
| 79 | |
| 80 | pub fn jsonb_stringify<'a>(a: Datum<'a>, temp_storage: &'a RowArena) -> Option<&'a str> { |
| 81 | match a { |
| 82 | Datum::JsonNull => None, |
| 83 | Datum::String(s) => Some(s), |
| 84 | _ => { |
| 85 | let s = cast_jsonb_to_string(JsonbRef::from_datum(a)); |
| 86 | Some(temp_storage.push_string(s)) |
| 87 | } |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | #[sqlfunc( |
| 92 | is_monotone = "(true, true)", |
no test coverage detected