Sha256: 56855f2c8f96aa96503c70f9a308bbdd08295a38bed670a9668786c7a1101f9d

Contents?: true

Size: 350 Bytes

Versions: 2

Compression:

Stored size: 350 Bytes

Contents

module SandthornDriverSequel
  module EventStoreContext
    attr_reader :context

    def events_table_name
      with_context_if_exists :events
    end

    def aggregates_table_name
      with_context_if_exists :aggregates
    end

    def with_context_if_exists name
      name = "#{context}_#{name}".to_sym if context
      name
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sandthorn_driver_sequel-4.1.0 lib/sandthorn_driver_sequel/event_store_context.rb
sandthorn_driver_sequel-4.0.0 lib/sandthorn_driver_sequel/event_store_context.rb