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

Function concat_function

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

Source from the content-addressed store, hash-verified

526
527 #[test]
528 fn concat_function() {
529 let (expr, deps) = parse_ok("CONCAT(name, ' ', brand)");
530 assert_eq!(deps, vec!["brand", "name"]);
531 let doc = Value::from(serde_json::json!({"name": "Shoe", "brand": "Nike"}));
532 assert_eq!(expr.eval(&doc), Value::String("Shoe Nike".into()));
533 }
534
535 #[test]
536 fn coalesce() {

Callers

nothing calls this directly

Calls 1

parse_okFunction · 0.70

Tested by

no test coverage detected