pub trait ProcedurePlugin: Send + Sync {
// Required methods
fn signature(&self) -> &ProcedureSignature;
fn invoke(
&self,
ctx: ProcedureContext<'_>,
args: &[ColumnarValue],
) -> Result<SendableRecordBatchStream, FnError>;
}Expand description
A Cypher procedure plugin — CALL uni.foo.bar(args) YIELD ....
Procedures return a stream of RecordBatches; the host attaches the
stream to the surrounding query plan via a ProcedureCallExec node.
Required Methods§
Sourcefn signature(&self) -> &ProcedureSignature
fn signature(&self) -> &ProcedureSignature
Static signature.
Sourcefn invoke(
&self,
ctx: ProcedureContext<'_>,
args: &[ColumnarValue],
) -> Result<SendableRecordBatchStream, FnError>
fn invoke( &self, ctx: ProcedureContext<'_>, args: &[ColumnarValue], ) -> Result<SendableRecordBatchStream, FnError>
Invoke the procedure with the given arguments and execution context.
The returned stream is consumed lazily by downstream YIELD. The
procedure is responsible for cooperatively yielding to the executor
(no long blocking calls; use tokio::task::yield_now between batches).
§Errors
Returns FnError if the procedure cannot start (validation
failure, capability check). Errors raised during stream production
are signaled via Err items in the stream.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".