Class: ActiveRecord::ConnectionAdapters::OracleEnhancedConnection
- Inherits:
-
Object
- Object
- ActiveRecord::ConnectionAdapters::OracleEnhancedConnection
- Defined in:
- lib/active_record/connection_adapters/oracle_enhanced_connection.rb
Overview
interface independent methods
Direct Known Subclasses
Instance Attribute Summary collapse
-
#raw_connection ⇒ Object
readonly
Returns the value of attribute raw_connection.
Class Method Summary collapse
Instance Method Summary collapse
-
#oracle_downcase(column_name) ⇒ Object
Oracle column names by default are case-insensitive, but treated as upcase; for neatness, we’ll downcase within Rails.
Instance Attribute Details
#raw_connection ⇒ Object (readonly)
Returns the value of attribute raw_connection.
17 18 19 |
# File 'lib/active_record/connection_adapters/oracle_enhanced_connection.rb', line 17 def raw_connection @raw_connection end |
Class Method Details
.create(config) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/active_record/connection_adapters/oracle_enhanced_connection.rb', line 6 def self.create(config) case ORACLE_ENHANCED_CONNECTION when :oci OracleEnhancedOCIConnection.new(config) when :jdbc OracleEnhancedJDBCConnection.new(config) else nil end end |
Instance Method Details
#oracle_downcase(column_name) ⇒ Object
Oracle column names by default are case-insensitive, but treated as upcase; for neatness, we’ll downcase within Rails. EXCEPT that folks CAN quote their column names when creating Oracle tables, which makes then case-sensitive. I don’t know anybody who does this, but we’ll handle the theoretical case of a camelCase column name. I imagine other dbs handle this different, since there’s a unit test that’s currently failing test_oci.
25 26 27 |
# File 'lib/active_record/connection_adapters/oracle_enhanced_connection.rb', line 25 def oracle_downcase(column_name) column_name =~ /[a-z]/ ? column_name : column_name.downcase end |