Class: LlmCostTracker::Ledger::Rollups::UpsertSql
- Inherits:
-
Object
- Object
- LlmCostTracker::Ledger::Rollups::UpsertSql
- Defined in:
- lib/llm_cost_tracker/ledger/rollups/upsert_sql.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.call ⇒ Object
9 10 11 |
# File 'lib/llm_cost_tracker/ledger/rollups/upsert_sql.rb', line 9 def self.call new.call end |
Instance Method Details
#call ⇒ Object
13 14 15 16 17 18 |
# File 'lib/llm_cost_tracker/ledger/rollups/upsert_sql.rb', line 13 def call return Arel.sql(mysql_sql) if Ledger::Schema::Adapter.mysql?(connection) return Arel.sql(postgres_sql) if Ledger::Schema::Adapter.postgresql?(connection) Ledger::Schema::Adapter.ensure_supported!(connection) end |