Sha256: 169d5de9392b32a95d4c154df7ee8421a7c29dec162ed730dd5d77ff53fe6a34

Contents?: true

Size: 599 Bytes

Versions: 19

Compression:

Stored size: 599 Bytes

Contents

module EventSource
  module Postgres
    module Controls
      module Put
        def self.call(instances: nil, stream_name: nil, event: nil, category: nil)
          instances ||= 1
          stream_name ||= StreamName.example(category: category)

          event_specified = !event.nil?

          event ||= EventData::Write.example

          instances.times do
            EventSource::Postgres::Put.(event, stream_name)

            unless event_specified
              event.id = EventData::Write.id
            end
          end

          stream_name
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
evt-event_source-postgres-0.19.0.3 lib/event_source/postgres/controls/put.rb
evt-event_source-postgres-0.19.0.2 lib/event_source/postgres/controls/put.rb
evt-event_source-postgres-0.19.0.1 lib/event_source/postgres/controls/put.rb
evt-event_source-postgres-0.19.0.0 lib/event_source/postgres/controls/put.rb
evt-event_source-postgres-0.18.0.1 lib/event_source/postgres/controls/put.rb
evt-event_source-postgres-0.18.0.0 lib/event_source/postgres/controls/put.rb
evt-event_source-postgres-0.17.2.0 lib/event_source/postgres/controls/put.rb
evt-event_source-postgres-0.17.1.0 lib/event_source/postgres/controls/put.rb
evt-event_source-postgres-0.17.0.2 lib/event_source/postgres/controls/put.rb
evt-event_source-postgres-0.17.0.0 lib/event_source/postgres/controls/put.rb
evt-event_source-postgres-0.16.1.0 lib/event_source/postgres/controls/put.rb
evt-event_source-postgres-0.16.0.0 lib/event_source/postgres/controls/put.rb
evt-event_source-postgres-0.15.1.0 lib/event_source/postgres/controls/put.rb
evt-event_source-postgres-0.15.0.0 lib/event_source/postgres/controls/put.rb
evt-event_source-postgres-0.14.0.0 lib/event_source/postgres/controls/put.rb
evt-event_source-postgres-0.13.1.0 lib/event_source/postgres/controls/put.rb
evt-event_source-postgres-0.13.0.0 lib/event_source/postgres/controls/put.rb
evt-event_source-postgres-0.12.1.1 lib/event_source/postgres/controls/put.rb
evt-event_source-postgres-0.12.1.0 lib/event_source/postgres/controls/put.rb