FFIOperator

Trait FFIOperator 

Source
pub trait FFIOperator:
    Send
    + Sync
    + 'static {
    // Required methods
    fn new(
        operator_id: FlowNodeId,
        config: &HashMap<String, Value>,
    ) -> Result<Self>
       where Self: Sized;
    fn apply(
        &mut self,
        ctx: &mut OperatorContext,
        input: FlowChange,
    ) -> Result<FlowChange>;
    fn get_rows(
        &mut self,
        ctx: &mut OperatorContext,
        row_numbers: &[RowNumber],
    ) -> Result<Vec<Option<Row>>>;
}
Expand description

Runtime operator behavior Operators must be Send + Sync for thread safety

Required Methods§

Source

fn new(operator_id: FlowNodeId, config: &HashMap<String, Value>) -> Result<Self>
where Self: Sized,

Create a new operator instance with the operator ID and configuration

Source

fn apply( &mut self, ctx: &mut OperatorContext, input: FlowChange, ) -> Result<FlowChange>

Process a flow change (inserts, updates, removes)

Source

fn get_rows( &mut self, ctx: &mut OperatorContext, row_numbers: &[RowNumber], ) -> Result<Vec<Option<Row>>>

Get specific rows by row number

Implementors§