pub fn parse_script(
src: &str,
param_pool: &BTreeMap<String, DataValue>,
fixed_rules: &BTreeMap<String, Arc<Box<dyn FixedRule>>>,
cur_vld: ValidityTs,
) -> Result<CozoScript>Expand description
This parses a text script into the AST used by Cozo.
Note! This is an unstable interface, the signature may change between releases. Depend on it at your own risk.
-
src- the script to parse -
param_pool- the list of parameters to execute the script with. These are substituted into the syntax tree during parsing. -
fixed_rules- a mapping of fixed rule names to their implementations. These are substituted into the syntax tree during parsing. -
cur_vld- the current timestamp, substituted into expressions where validity is relevant.