Module: Chronos::Ports::QueryInspector

Defined in:
lib/chronos/ports/query_inspector.rb

Overview

Documents the optional read-only database-inspection boundary used by SQL monitoring.

Examples:

QueryInspector.compatible?(adapter) #=> true

Constant Summary collapse

REQUIRED_METHODS =
[:call].freeze

Class Method Summary collapse

Class Method Details

.compatible?(object) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
19
20
# File 'lib/chronos/ports/query_inspector.rb', line 16

def self.compatible?(object)
  REQUIRED_METHODS.all? { |method_name| object.respond_to?(method_name) }
rescue StandardError
  false
end