pub struct Procedure {
pub qualified_name: Vec<String>,
pub inputs: Vec<ProcArgSpec>,
pub outputs: Vec<ProcOutSpec>,
pub rows: Vec<ProcRow>,
pub builtin: Option<BuiltinProc>,
}Expand description
A procedure registered with a ProcedureRegistry. The TCK
harness builds one per And there exists a procedure ... step by
collating the signature and the gherkin data table: each data row
contributes one entry to rows where the leading cells are the
input-column values (matched against call arguments) and the
trailing cells are the output-column values (projected by
YIELD).
Built-in procedures — db.labels() and friends — leave rows
empty and set builtin so the executor materialises the row set
live from the current graph via Procedure::resolve_rows.
Fields§
§qualified_name: Vec<String>§inputs: Vec<ProcArgSpec>§outputs: Vec<ProcOutSpec>§rows: Vec<ProcRow>§builtin: Option<BuiltinProc>Implementations§
Source§impl Procedure
impl Procedure
Sourcepub fn row_matches(&self, row: &ProcRow, args: &[Value]) -> bool
pub fn row_matches(&self, row: &ProcRow, args: &[Value]) -> bool
True when the call arguments match this row’s input columns.
Applied per row during execution — rows whose input cells
differ from the supplied arg values are filtered out.
Argument-type coercion (FLOAT accepts an integer, etc.) is
handled by the caller converting the call arg to the declared
type before comparing here.
Sourcepub fn resolve_rows(&self, reader: &dyn GraphReader) -> Result<Vec<ProcRow>>
pub fn resolve_rows(&self, reader: &dyn GraphReader) -> Result<Vec<ProcRow>>
Produce the row set the executor should iterate. Static
procedures simply hand back their pre-populated rows;
built-ins derive their rows from the live graph via reader.