Class: LiveQueryPool
- Inherits:
-
Volt::GenericPool
- Object
- Volt::GenericPool
- LiveQueryPool
- Defined in:
- app/volt/tasks/live_query/live_query_pool.rb
Overview
LiveQueryPool runs on the server and keeps track of all outstanding queries.
Instance Attribute Summary
Attributes inherited from Volt::GenericPool
Instance Method Summary collapse
-
#initialize(data_store) ⇒ LiveQueryPool
constructor
A new instance of LiveQueryPool.
- #lookup(collection, query) ⇒ Object
- #updated_collection(collection, skip_channel) ⇒ Object
Methods inherited from Volt::GenericPool
#clear, #create_new_item, #inspect, #lookup_all, #lookup_without_generate, #print, #remove, #transform_item
Constructor Details
#initialize(data_store) ⇒ LiveQueryPool
Returns a new instance of LiveQueryPool.
8 9 10 11 |
# File 'app/volt/tasks/live_query/live_query_pool.rb', line 8 def initialize(data_store) @data_store = data_store super() end |
Instance Method Details
#lookup(collection, query) ⇒ Object
13 14 15 16 17 18 |
# File 'app/volt/tasks/live_query/live_query_pool.rb', line 13 def lookup(collection, query) # collection = collection.to_sym query = normalize_query(query) super(collection, query) end |
#updated_collection(collection, skip_channel) ⇒ Object
20 21 22 23 24 25 |
# File 'app/volt/tasks/live_query/live_query_pool.rb', line 20 def updated_collection(collection, skip_channel) # collection = collection.to_sym lookup_all(collection).each do |live_query| live_query.run(skip_channel) end end |