module Sequent::Core::Persistors::ReplayOptimizedPostgresPersistor::InMemoryStruct
We create a struct on the fly to represent an in-memory record.
Since the replay happens in memory we implement the ==, eql? and hash methods to point to the same object. A record is the same if and only if they point to the same object. These methods are necessary since we use Set instead of [].
Also basing equality on object identity is more consistent with ActiveRecord, which is the implementation used during normal (non-optimized) replay.
Public Instance Methods
Source
# File lib/sequent/core/persistors/replay_optimized_postgres_persistor.rb, line 71 def ==(other) equal?(other) end
Source
# File lib/sequent/core/persistors/replay_optimized_postgres_persistor.rb, line 74 def eql?(other) equal?(other) end
Source
# File lib/sequent/core/persistors/replay_optimized_postgres_persistor.rb, line 77 def hash object_id.hash end