Sha256: 497ae1ab8484d63e4637ec33f28d99a1687e8570f52bd49f5b8b83d716858c1a
Contents?: true
Size: 1.37 KB
Versions: 2
Compression:
Stored size: 1.37 KB
Contents
require "sequel" require "sandthorn_event_filter" require "simple_migrator" require "sandthorn" require "sandthorn_sequel_projection/errors" require "sandthorn_sequel_projection/version" require "sandthorn_sequel_projection/utilities" require "sandthorn_sequel_projection/cursor" require "sandthorn_sequel_projection/event_handler" require "sandthorn_sequel_projection/event_handler_collection" require "sandthorn_sequel_projection/projection" require "sandthorn_sequel_projection/lock" require "sandthorn_sequel_projection/processed_events_tracker" require "sandthorn_sequel_projection/manifest" require "sandthorn_sequel_projection/runner" module SandthornSequelProjection class << self require 'delegate' extend Forwardable def_delegators :configuration, :batch_size, :event_stores attr_accessor :configuration def configure @configuration ||= Configuration.default yield(configuration) if block_given? start end def start ProcessedEventsTracker.migrate!(configuration.db_connection) end def find_event_store(name) Sandthorn.find_event_store(name) end end class Configuration attr_accessor :db_connection, :event_stores, :projections_folder, :batch_size def initialize yield(self) if block_given? end def self.default self.new do |c| c.batch_size = 40 end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
sandthorn_sequel_projection-0.0.2 | lib/sandthorn_sequel_projection.rb |
sandthorn_sequel_projection-0.0.1 | lib/sandthorn_sequel_projection.rb |