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

Method execute

nodedb/src/control/cluster/array_cluster_exec.rs:241–311  ·  view source on GitHub ↗

Execute a `ClusterArrayOp` and return raw response bytes ready to be returned to the client. The response format mirrors local `ArrayOp` responses so downstream decode logic is unchanged.

(&self, op: &ClusterArrayOp)

Source from the content-addressed store, hash-verified

239 /// returned to the client. The response format mirrors local `ArrayOp`
240 /// responses so downstream decode logic is unchanged.
241 pub async fn execute(&self, op: &ClusterArrayOp) -> crate::Result<Vec<u8>> {
242 match op {
243 ClusterArrayOp::Slice {
244 array_id,
245 slice_msgpack,
246 attr_projection,
247 limit,
248 slice_hilbert_ranges,
249 prefix_bits,
250 system_as_of,
251 valid_at_ms,
252 } => {
253 self.execute_slice(SliceArgs {
254 array_id,
255 slice_msgpack,
256 attr_projection,
257 limit: *limit,
258 slice_hilbert_ranges,
259 prefix_bits: *prefix_bits,
260 system_as_of: *system_as_of,
261 valid_at_ms: *valid_at_ms,
262 })
263 .await
264 }
265
266 ClusterArrayOp::Agg {
267 array_id,
268 attr_idx,
269 reducer_msgpack,
270 group_by_dim,
271 slice_hilbert_ranges,
272 prefix_bits,
273 system_as_of,
274 valid_at_ms,
275 } => {
276 self.execute_agg(AggArgs {
277 array_id,
278 attr_idx: *attr_idx,
279 reducer_msgpack,
280 group_by_dim: *group_by_dim,
281 slice_hilbert_ranges,
282 prefix_bits: *prefix_bits,
283 system_as_of: *system_as_of,
284 valid_at_ms: *valid_at_ms,
285 })
286 .await
287 }
288
289 ClusterArrayOp::Put {
290 array_id_msgpack,
291 cells,
292 wal_lsn,
293 prefix_bits,
294 ..
295 } => {
296 self.execute_put(array_id_msgpack, cells, *wal_lsn, *prefix_bits)
297 .await
298 }

Callers

nothing calls this directly

Calls 4

execute_sliceMethod · 0.80
execute_aggMethod · 0.80
execute_putMethod · 0.80
execute_deleteMethod · 0.80

Tested by

no test coverage detected