MCPcopy Create free account
hub / github.com/erans/pgsqlite / convert_row

Method convert_row

src/protocol/value_handler.rs:331–352  ·  view source on GitHub ↗

Convert a row of SQLite values to mapped values

(
        &self,
        values: &[SqliteValue],
        type_oids: &[i32],
        binary_format: bool,
    )

Source from the content-addressed store, hash-verified

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 {

Callers 1

test_row_conversionFunction · 0.80

Calls 2

lenMethod · 0.45
convert_valueMethod · 0.45

Tested by 1

test_row_conversionFunction · 0.64