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

Function key

nodedb/src/control/gateway/plan_cache.rs:272–278  ·  view source on GitHub ↗
(sql: &str, collection: &str, version: u64)

Source from the content-addressed store, hash-verified

270 }
271
272 fn key(sql: &str, collection: &str, version: u64) -> PlanCacheKey {
273 PlanCacheKey {
274 sql_text_hash: hash_sql(sql),
275 placeholder_types_hash: 0,
276 version_set: GatewayVersionSet::from_pairs(vec![(collection.into(), version)]),
277 }
278 }
279
280 #[test]
281 fn cache_hit_and_miss() {

Calls 1

hash_sqlFunction · 0.70