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

CHAR should return nil for NULL values in column #2289

Open
wants to merge 1 commit into
base: master
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
CHAR should return nil for NULL values in column
lib/active_record/connection_adapters/oracle_enhanced/oci_connection.rb
- Return nil for NULL value in CHAR column similar to behavior in
  lib/active_record/connection_adapters/oracle_enhanced/jdbc_connection.rb
sprileyMSTS committed Apr 28, 2022
commit ab89e49c326b608865adc6612a3bd2e0f8b36d19
Original file line number Diff line number Diff line change
@@ -165,7 +165,7 @@ def fetch(options = {})
key = col_metadata.data_type
case key.to_s.downcase
when "char"
col_value = col.to_s.rstrip
col_value = col.to_s.rstrip unless col_value.nil?
end
end
col_index = col_index + 1
@@ -207,7 +207,7 @@ def select(sql, name = nil, return_column_names = false)
key = col_metadata.data_type
case key.to_s.downcase
when "char"
col_value = col_value.to_s.rstrip
col_value = col_value.to_s.rstrip unless col_value.nil?
end
end
hash[col] = col_value