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
==(other)
click to toggle source
# File lib/sequent/core/persistors/replay_optimized_postgres_persistor.rb, line 72 def ==(other) equal?(other) end
eql?(other)
click to toggle source
# File lib/sequent/core/persistors/replay_optimized_postgres_persistor.rb, line 75 def eql?(other) equal?(other) end
hash()
click to toggle source
# File lib/sequent/core/persistors/replay_optimized_postgres_persistor.rb, line 78 def hash object_id.hash end