(sql: &str, collection: &str, version: u64)
| 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() { |