async fn upsert_command<U, T: Serialize>(
store: &MockSuotarStore,
generation: &str,
hash: EntityHash,
result_key: &'static str,
items: Vec<U>,
build: impl Fn(U) -> T,
key_of: impl Fn(&T) -> String,
) -> Result<Value, CommandError>Expand description
The shared body behind every Upsert* command. key_of reads the id off the built entity rather
than the wire type, so a derived id is what comes back under result_key.