Module: LlmCostTracker::Doctor::Probe

Defined in:
lib/llm_cost_tracker/doctor/probe.rb

Class Method Summary collapse

Class Method Details

.table_exists?(name) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
11
12
13
# File 'lib/llm_cost_tracker/doctor/probe.rb', line 8

def self.table_exists?(name)
  LlmCostTracker::Call.connection.data_source_exists?(name)
rescue ActiveRecord::ConnectionNotEstablished, ActiveRecord::NoDatabaseError,
       ActiveRecord::ConnectionFailed, ActiveRecord::StatementInvalid
  false
end