Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downcase keys in result row hash. #19

Open
wants to merge 1 commit into
base: AR5.0-support
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ def view_definition(view_name, name = nil)
results = select_all("SELECT view_definition, check_option FROM information_schema.views WHERE table_schema = SCHEMA() AND table_name = #{quote(view_name)}", name)
if results.any?
row = results.first
row.transform_keys!(&:downcase)
sql = row["view_definition"]
sql.gsub!(%r{#{quote_table_name(current_database)}[.]}, '')
case row["check_option"]
Expand Down