Module: ROM::Plugins::Relation::SQL::Instrumentation Private

Defined in:
lib/rom/plugins/relation/sql/instrumentation.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/rom/plugins/relation/sql/instrumentation.rb', line 9

def self.included(klass)
  super

  klass.class_eval do
    include ROM::Plugins::Relation::Instrumentation

    # @api private
    def notification_payload(relation)
      super.merge(query: relation.dataset.sql)
    end
  end
end