MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / flush_partial_batch

Function flush_partial_batch

nodedb/src/control/trigger/batch/collector.rs:375–383  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

373
374 #[test]
375 fn flush_partial_batch() {
376 let mut c = TriggerBatchCollector::new(10);
377 c.push("orders", "INSERT", 1, row("1"));
378 c.push("orders", "INSERT", 1, row("2"));
379 let batch = c.flush();
380 assert!(batch.is_some());
381 assert_eq!(batch.unwrap().rows.len(), 2);
382 assert!(!c.has_pending());
383 }
384
385 #[test]
386 fn different_collection_flushes_old() {

Callers

nothing calls this directly

Calls 3

rowFunction · 0.70
pushMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected