Convert a row of SQLite values to mapped values
(
&self,
values: &[SqliteValue],
type_oids: &[i32],
binary_format: bool,
)
| 329 | |
| 330 | /// Convert a row of SQLite values to mapped values |
| 331 | pub fn convert_row( |
| 332 | &self, |
| 333 | values: &[SqliteValue], |
| 334 | type_oids: &[i32], |
| 335 | binary_format: bool, |
| 336 | ) -> io::Result<Vec<Option<MappedValue>>> { |
| 337 | if values.len() != type_oids.len() { |
| 338 | return Err(io::Error::new( |
| 339 | io::ErrorKind::InvalidInput, |
| 340 | "Values and type OIDs length mismatch" |
| 341 | )); |
| 342 | } |
| 343 | |
| 344 | let mut result = Vec::with_capacity(values.len()); |
| 345 | |
| 346 | for (value, &type_oid) in values.iter().zip(type_oids.iter()) { |
| 347 | let mapped_value = self.convert_value(value, type_oid, binary_format)?; |
| 348 | result.push(mapped_value); |
| 349 | } |
| 350 | |
| 351 | Ok(result) |
| 352 | } |
| 353 | |
| 354 | /// Get statistics about memory usage |
| 355 | pub fn get_memory_stats(&self) -> ValueHandlerStats { |