Skip to main content

reifydb_sub_flow/operator/scan/
flow.rs

1// SPDX-License-Identifier: Apache-2.0
2// Copyright (c) 2025 ReifyDB
3
4use reifydb_core::{
5	interface::{
6		catalog::flow::{Flow, FlowNodeId},
7		change::Change,
8	},
9	value::column::columns::Columns,
10};
11use reifydb_type::{Result, value::row_number::RowNumber};
12
13use crate::{Operator, transaction::FlowTransaction};
14
15pub struct PrimitiveFlowOperator {
16	node: FlowNodeId,
17	#[allow(dead_code)]
18	flow: Flow,
19}
20
21impl PrimitiveFlowOperator {
22	pub fn new(node: FlowNodeId, flow: Flow) -> Self {
23		Self {
24			node,
25			flow,
26		}
27	}
28}
29
30impl Operator for PrimitiveFlowOperator {
31	fn id(&self) -> FlowNodeId {
32		self.node
33	}
34
35	fn apply(&self, _txn: &mut FlowTransaction, change: Change) -> Result<Change> {
36		Ok(change)
37	}
38
39	fn pull(&self, _txn: &mut FlowTransaction, _rows: &[RowNumber]) -> Result<Columns> {
40		// TODO: Implement flow pull
41		unimplemented!()
42	}
43}