MCPcopy Create free account
hub / github.com/erans/pgsqlite / get_metadata

Method get_metadata

src/cache/statement_pool.rs:168–174  ·  view source on GitHub ↗

Get cached metadata for a query

(&self, query: &str)

Source from the content-addressed store, hash-verified

166
167 /// Get cached metadata for a query
168 fn get_metadata(&self, query: &str) -> Option<StatementMetadata> {
169 let statements = self.statements.lock().ok()?;
170 statements.get(query).map(|cached| {
171 // Update last used time (we can't modify through the immutable reference)
172 cached.metadata.clone()
173 })
174 }
175
176 /// Cache metadata for a query
177 fn cache_metadata(&self, query: String, metadata: StatementMetadata) {

Callers 1

prepare_and_cacheMethod · 0.80

Calls 2

getMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected