Check if query might need binary protocol support (return false to use fallback)
(&self, query: &str)
| 236 | |
| 237 | /// Check if query might need binary protocol support (return false to use fallback) |
| 238 | fn supports_binary_protocol(&self, query: &str) -> bool { |
| 239 | // For now, don't use enhanced caching for queries that might have datetime types |
| 240 | // that require binary protocol support, as our caching doesn't yet handle |
| 241 | // the binary format requirements properly |
| 242 | let query_upper = query.to_uppercase(); |
| 243 | |
| 244 | // Skip enhanced caching for queries involving datetime types that might |
| 245 | // be accessed via extended protocol with binary format |
| 246 | if query_upper.contains("DATE") || |
| 247 | query_upper.contains("TIME") || |
| 248 | query_upper.contains("TIMESTAMP") { |
| 249 | return false; |
| 250 | } |
| 251 | |
| 252 | true |
| 253 | } |
| 254 | |
| 255 | /// Get comprehensive statistics including both statement pool and optimization metrics |
| 256 | pub fn get_comprehensive_stats(&self) -> StatementCacheStats { |
no outgoing calls
no test coverage detected