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

Method create_from_text

src/protocol/memory_mapped.rs:284–290  ·  view source on GitHub ↗

Create a mapped value from large text data

(&self, text_data: &str)

Source from the content-addressed store, hash-verified

282
283 /// Create a mapped value from large text data
284 pub fn create_from_text(&self, text_data: &str) -> io::Result<MappedValue> {
285 if text_data.is_empty() {
286 return Ok(MappedValue::Memory(Vec::new()));
287 }
288
289 MappedValue::from_slice(text_data.as_bytes(), &self.config)
290 }
291
292 /// Check if a value size should use memory mapping
293 pub fn should_use_mmap(&self, size: usize) -> bool {

Callers

nothing calls this directly

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected