Get the value of a column `idx` of the `row` as `Vec `.
(row: &Row, idx: usize)
| 914 | |
| 915 | /// Get the value of a column `idx` of the `row` as `Vec<u8>`. |
| 916 | pub fn row_get_vec(row: &Row, idx: usize) -> rusqlite::Result<Vec<u8>> { |
| 917 | row.get(idx).or_else(|err| match row.get_ref(idx)? { |
| 918 | ValueRef::Null => Ok(Vec::new()), |
| 919 | ValueRef::Text(text) => Ok(text.to_vec()), |
| 920 | ValueRef::Blob(blob) => Ok(blob.to_vec()), |
| 921 | ValueRef::Integer(_) | ValueRef::Real(_) => Err(err), |
| 922 | }) |
| 923 | } |
| 924 | |
| 925 | /// Enumerates used files in the blobdir and removes unused ones. |
| 926 | #[expect(clippy::arithmetic_side_effects)] |