13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/llm_cost_tracker/ledger/schema/call_rollups.rb', line 13
def current_schema_errors
connection = LlmCostTracker::CallRollup.connection
Adapter.ensure_supported!(connection)
table_name = LlmCostTracker::CallRollup.table_name
return ["#{table_name} table is missing"] unless connection.data_source_exists?(table_name)
columns = LlmCostTracker::CallRollup.columns_hash
cache = @schema_capabilities
return cache.fetch(:errors) if cache && cache.fetch(:columns).equal?(columns)
errors = compute_errors(connection, table_name, columns)
@schema_capabilities = { columns: columns, errors: errors }
errors
end
|