MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / nested_functions

Function nested_functions

nodedb-query/src/expr_parse/parser.rs:586–590  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

584
585 #[test]
586 fn nested_functions() {
587 let (expr, _) = parse_ok("ROUND(price * (1 - COALESCE(discount, 0)), 2)");
588 let doc = Value::from(serde_json::json!({"price": 49.99}));
589 assert_eq!(expr.eval(&doc), Value::Float(49.99));
590 }
591
592 #[test]
593 fn deeply_nested_parentheses_return_error_not_stack_overflow() {

Callers

nothing calls this directly

Calls 1

parse_okFunction · 0.70

Tested by

no test coverage detected