Sha256: beb074bf981d6224dbd2e7c9989ce93da9b9c57a9287a15b0870c448105cc96f
Contents?: true
Size: 1.01 KB
Versions: 15
Compression:
Stored size: 1.01 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: {}) stream = queries.streams.find_stream(stream) || raise(StreamNotFoundError, stream) unless stream.all_stream? queries.events.stream_events(stream, options) end end end end
Version data entries
15 entries across 15 versions & 1 rubygems