Class: Sqlx::QueryCacheEntry
Overview
One cached SELECT result: the rows plus the cache generation the read started in. The generation is captured before the statement executes, so a write that lands while the read is in flight cannot publish pre-write rows under the new generation.
Instance Method Summary collapse
-
#generation ⇒ Integer
the cache generation the entry belongs to.
-
#initialize(generation, rows) ⇒ void
constructor
one cached SELECT result: the rows and the cache generation the read started in.
-
#rows ⇒ Array
the cached name-keyed rows.
Constructor Details
#initialize(generation, rows) ⇒ void
one cached SELECT result: the rows and the cache generation the read started in.
34 35 36 37 |
# File 'runtime/database/query_cache.rb', line 34 def initialize(generation, rows) @generation = generation @rows = rows end |