Sha256: ca4d50e223c83c8a8e7fada2c19543c2f7b9603991bc2177392f08e4ae936911
Contents?: true
Size: 1 KB
Versions: 20
Compression:
Stored size: 1 KB
Contents
# frozen_string_literal: true module PgEventstore module Commands # @!visibility private class Read < AbstractCommand # @param stream [PgEventstore::Stream] # @param options [Hash] request options # @option options [String] :direction read direction - 'Forwards' or 'Backwards' # @option options [Integer, Symbol] :from_revision. **Use this option when stream name is a normal stream name** # @option options [Integer, Symbol] :from_position. **Use this option when reading from "all" stream** # @option options [Integer] :max_count # @option options [Boolean] :resolve_link_tos # @option options [Hash] :filter provide it to filter events # @return [Array<PgEventstore::Event>] # @raise [PgEventstore::StreamNotFoundError] def call(stream, options: {}) queries.events.stream_revision(stream) || raise(StreamNotFoundError, stream) unless stream.all_stream? queries.events.stream_events(stream, options) end end end end
Version data entries
20 entries across 20 versions & 1 rubygems