MCPcopy Create free account
hub / github.com/deventlab/d-engine / generate_insert_commands

Function generate_insert_commands

d-engine-server/tests/common/mod.rs:485–494  ·  view source on GitHub ↗
(ids: Vec<u64>)

Source from the content-addressed store, hash-verified

483}
484
485pub fn generate_insert_commands(ids: Vec<u64>) -> Bytes {
486 let mut buffer = BytesMut::new();
487
488 for id in ids {
489 let cmd = WriteCommand::insert(safe_kv_bytes(id), safe_kv_bytes(id));
490 cmd.encode(&mut buffer).expect("Failed to encode insert command");
491 }
492
493 buffer.freeze()
494}
495
496pub async fn reset(case_name: &str) -> std::result::Result<(), ClientApiError> {
497 let root_path = get_root_path();

Callers 3

manipulate_logFunction · 0.70
insert_raft_logFunction · 0.50
simulate_insert_commandFunction · 0.50

Calls 1

safe_kv_bytesFunction · 0.85

Tested by

no test coverage detected