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

Function build_sql_with_personalization

nodedb-client/src/graph_dsl.rs:116–124  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

114
115 #[test]
116 fn build_sql_with_personalization() {
117 let mut seed = HashMap::new();
118 seed.insert("alice".to_string(), 1.0);
119 let sql = build_pagerank_sql("social", Some(&seed), None, None).unwrap();
120 assert_eq!(
121 sql,
122 r#"GRAPH ALGO PAGERANK ON 'social' PERSONALIZATION {"alice":1.0}"#
123 );
124 }
125
126 #[test]
127 fn empty_personalization_omits_clause() {

Callers

nothing calls this directly

Calls 3

build_pagerank_sqlFunction · 0.85
to_stringMethod · 0.80
insertMethod · 0.45

Tested by

no test coverage detected