Sha256: e3fa3b94c8bd0fc3fc8667643b04b5f4b9465cdd6755ca31d538a891494ea50e
Contents?: true
Size: 756 Bytes
Versions: 26
Compression:
Stored size: 756 Bytes
Contents
require_relative "success_serializer" module Foobara module CommandConnectors module Serializers class RecordStoreSerializer < SuccessSerializer def atomic_serializer @atomic_serializer ||= AtomicSerializer.new(declaration_data) end def serialize(_object) store = {} declaration_data.command.transactions.each do |tx| tx.each_table do |table| key = table.entity_class.full_entity_name map = store[key] ||= {} table.tracked_records.each do |record| map[record.primary_key] = atomic_serializer.transform(record) end end end store end end end end end
Version data entries
26 entries across 26 versions & 1 rubygems