Skip to content

Commit

Permalink
APP-3470 Initialize known views to support checking for existence (lo…
Browse files Browse the repository at this point in the history
  • Loading branch information
gspugh-sb authored and zokioki committed Aug 30, 2024
1 parent a18a9ef commit 73c3ad5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/odbc_adapter/schema_statements.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,14 @@ def tables(_name = nil)

# Returns an array of view names defined in the database.
def views
[]
views_query = "SHOW VIEWS IN SCHEMA #{current_schema}"

# Temporarily disable debug logging
query_results = ActiveRecord::Base.logger.silence do
exec_query(views_query)
end

query_results.map { |query_result| format_case(query_result["name"]) }
end

# Returns an array of indexes for the given table.
Expand Down

0 comments on commit 73c3ad5

Please sign in to comment.