Sha256: 65a6e6a678b9291e0d33bea706484fd7bc7a7690310b2af66a35479df47ea686

Contents?: true

Size: 654 Bytes

Versions: 13

Compression:

Stored size: 654 Bytes

Contents

require 'volt/utils/generic_pool'
require 'volt/models/persistors/query/query_listener'

module Volt
  # Keeps track of all query listeners, so they can be reused in different
  # places.  Dynamically generated queries may end up producing the same
  # query in different places.  This makes it so we only need to track a
  # single query at once.  Data updates will only be sent once as well.
  class QueryListenerPool < GenericPool
    def print
      puts '--- Running Queries ---'

      @pool.each_pair do |table, query_hash|
        query_hash.each_key do |query|
          puts "#{table}: #{query.inspect}"
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
volt-0.8.27.beta3 lib/volt/models/persistors/query/query_listener_pool.rb
volt-0.8.27.beta2 lib/volt/models/persistors/query/query_listener_pool.rb
volt-0.8.27.beta1 lib/volt/models/persistors/query/query_listener_pool.rb
volt-0.8.26.beta1 lib/volt/models/persistors/query/query_listener_pool.rb
volt-0.8.26 lib/volt/models/persistors/query/query_listener_pool.rb
volt-0.8.24 lib/volt/models/persistors/query/query_listener_pool.rb
volt-0.8.23 lib/volt/models/persistors/query/query_listener_pool.rb
volt-0.8.22 lib/volt/models/persistors/query/query_listener_pool.rb
volt-0.8.22.beta2 lib/volt/models/persistors/query/query_listener_pool.rb
volt-0.8.22.beta1 lib/volt/models/persistors/query/query_listener_pool.rb
volt-0.8.21 lib/volt/models/persistors/query/query_listener_pool.rb
volt-0.8.20 lib/volt/models/persistors/query/query_listener_pool.rb
volt-0.8.19 lib/volt/models/persistors/query/query_listener_pool.rb