Class: Volt::QueryListenerPool

Inherits:
GenericPool show all
Defined in:
lib/volt/models/persistors/query/query_listener_pool.rb

Overview

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.

Instance Attribute Summary

Attributes inherited from GenericPool

#pool

Instance Method Summary collapse

Methods inherited from GenericPool

#create_new_item, #initialize, #lookup, #lookup_all, #remove, #transform_item

Constructor Details

This class inherits a constructor from Volt::GenericPool

Instance Method Details



10
11
12
13
14
15
16
17
18
# File 'lib/volt/models/persistors/query/query_listener_pool.rb', line 10

def print
  puts '--- Running Queries ---'

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