Class: ActiveRecord::Materialized::PartitionKeyedStore Private
- Inherits:
-
Object
- Object
- ActiveRecord::Materialized::PartitionKeyedStore
- Defined in:
- lib/activerecord/materialized/partition_keyed_store.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Shared base for the per-partition stores keyed by (view_name, partition_key): PartitionState (the cold-view fresh set) and SourceWatermark (the CDC watermark). Centralizes the primitives they must share — most importantly #serialize, which has to be identical across every store, or a mark and a watermark would key the same partition differently and lookups would silently miss.
A subclass supplies the three things that differ — its #record_class, #table_name, and the table-specific columns via #define_columns — and may override #ensure_columns! to lazily add a column introduced after the table was first provisioned.
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(view_class) ⇒ PartitionKeyedStore
constructor
private
A new instance of PartitionKeyedStore.
Constructor Details
#initialize(view_class) ⇒ PartitionKeyedStore
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of PartitionKeyedStore.
16 17 18 |
# File 'lib/activerecord/materialized/partition_keyed_store.rb', line 16 def initialize(view_class) @view_class = view_class end |