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

Function string_literal

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

Source from the content-addressed store, hash-verified

570
571 #[test]
572 fn string_literal() {
573 let (expr, _) = parse_ok("CONCAT(name, ' - ', 'default')");
574 let doc = Value::from(serde_json::json!({"name": "Product"}));
575 assert_eq!(expr.eval(&doc), Value::String("Product - default".into()));
576 }
577
578 #[test]
579 fn null_literal() {

Callers

nothing calls this directly

Calls 1

parse_okFunction · 0.70

Tested by

no test coverage detected