class
CQL::Postgres::StatementCache
- CQL::Postgres::StatementCache
- Reference
- Object
Overview
Least-recently-used map from SQL text to the statement the server holds for it. Entries over capacity are handed back for closing, never dropped silently, because the server keeps prepared statements until told to close.
Defined in:
postgres/statement_cache.crConstructors
Instance Method Summary
- #clear : Nil
- #delete(sql : String) : PreparedStatement | Nil
- #enabled? : Bool
-
#evict(room : Int32, keep : Set(String) = Set(String).new) : Array(PreparedStatement)
Removes the least recently used statements until room more fit, except those in keep (statements about to be used), and returns them to be closed.
- #fetch(sql : String) : PreparedStatement | Nil
- #next_name : String
- #size : Int32
- #store(sql : String, statement : PreparedStatement) : Nil
Constructor Detail
Instance Method Detail
Removes the least recently used statements until room more fit, except those in keep (statements about to be used), and returns them to be closed.