pub fn list_functions(input: &str) -> Result<Vec<String>>Expand description
List all function names defined in a SurrealQL string.
ยงExample
let fns = surql_parser::list_functions("
DEFINE FUNCTION fn::greet($name: string) { RETURN 'Hello, ' + $name; };
DEFINE FUNCTION fn::add($a: int, $b: int) { RETURN $a + $b; };
").unwrap();
assert_eq!(fns, vec!["greet", "add"]);