Skip to main content

reifydb_sub_flow/operator/scan/
flow.rs

1// SPDX-License-Identifier: Apache-2.0
2// Copyright (c) 2026 ReifyDB
3
4use reifydb_abi::operator::capabilities::OperatorCapability;
5use reifydb_core::interface::{
6	catalog::flow::{Flow, FlowNodeId},
7	change::Change,
8};
9use reifydb_value::Result;
10
11use crate::{Operator, transaction::FlowTransaction};
12
13pub struct PrimitiveFlowOperator {
14	node: FlowNodeId,
15	#[allow(dead_code)]
16	flow: Flow,
17}
18
19impl PrimitiveFlowOperator {
20	pub fn new(node: FlowNodeId, flow: Flow) -> Self {
21		Self {
22			node,
23			flow,
24		}
25	}
26}
27
28impl Operator for PrimitiveFlowOperator {
29	fn id(&self) -> FlowNodeId {
30		self.node
31	}
32
33	fn capabilities(&self) -> &[OperatorCapability] {
34		OperatorCapability::STANDARD
35	}
36
37	fn apply(&self, _txn: &mut FlowTransaction, change: Change) -> Result<Change> {
38		Ok(change)
39	}
40}