MCPcopy Create free account
hub / github.com/elastic/devfiler / insert

Method insert

src/storage/table.rs:290–296  ·  view source on GitHub ↗

Add a record to the insertion batch.

(&mut self, key: T::Key, value: T::Value)

Source from the content-addressed store, hash-verified

288impl<T: Table> InsertionBatch<'_, T> {
289 /// Add a record to the insertion batch.
290 pub fn insert(&mut self, key: T::Key, value: T::Value) {
291 let value = rkyv::to_bytes(&value).unwrap();
292 match T::MERGE_OP {
293 MergeOperator::Default => self.1.put(key.into_raw(), value),
294 MergeOperator::Associative(_) => self.1.merge(key.into_raw(), value),
295 }
296 }
297
298 /// Atomically insert the batch.
299 pub fn commit(self) {

Callers 12

test_cache_functionalityFunction · 0.45
test_cache_lru_evictionFunction · 0.45
test_cache_basic_usageFunction · 0.45
ingest_locationsFunction · 0.45
process_sampleFunction · 0.45
load_phosphor_iconsFunction · 0.45
build_flame_graphFunction · 0.45
query_top_funcsFunction · 0.45
ingest_task_controllerFunction · 0.45
insert_symbolsFunction · 0.45
ingestMethod · 0.45

Calls 1

into_rawMethod · 0.45

Tested by 4

test_cache_functionalityFunction · 0.36
test_cache_lru_evictionFunction · 0.36
test_cache_basic_usageFunction · 0.36