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

Function assign_or_zero

nodedb/src/control/wal_replication/decode.rs:46–55  ·  view source on GitHub ↗
(
    assigner: Option<&SurrogateAssigner>,
    collection: &str,
    pk_bytes: &[u8],
)

Source from the content-addressed store, hash-verified

44}
45
46fn assign_or_zero(
47 assigner: Option<&SurrogateAssigner>,
48 collection: &str,
49 pk_bytes: &[u8],
50) -> crate::Result<nodedb_types::Surrogate> {
51 match assigner {
52 Some(a) => a.assign(collection, pk_bytes),
53 None => Ok(nodedb_types::Surrogate::ZERO),
54 }
55}
56
57/// Convert a ReplicatedWrite back into a PhysicalPlan for Data Plane execution.
58fn to_physical_plan(

Callers 1

to_physical_planFunction · 0.85

Calls 1

assignMethod · 0.45

Tested by

no test coverage detected