module ActiveRecord::ConnectionAdapters::OracleEnhanced::Quoting
Constants
- COLUMN_NAME
- COLUMN_NAME_WITH_ORDER
- NONQUOTED_OBJECT_NAME
Names must be from 1 to 30 bytes long with these exceptions:
-
Names of databases are limited to 8 bytes.
-
Names of database links can be as long as 128 bytes.
Nonquoted identifiers cannot be Oracle Database reserved words
Nonquoted identifiers must begin with an alphabetic character from your database character set
Nonquoted identifiers can contain only alphanumeric characters from your database character set and the underscore (_), dollar sign ($), and pound sign (#). Oracle strongly discourages you from using $ and # in nonquoted identifiers.
-
- VALID_TABLE_NAME
Public Class Methods
mixed_case?(name)
click to toggle source
# File lib/active_record/connection_adapters/oracle_enhanced/quoting.rb, line 65 def self.mixed_case?(name) object_name = name.include?(".") ? name.split(".").second : name !!(object_name =~ /[A-Z]/ && object_name =~ /[a-z]/) end
Public Instance Methods
column_name_matcher()
click to toggle source
# File lib/active_record/connection_adapters/oracle_enhanced/quoting.rb, line 134 def column_name_matcher COLUMN_NAME end
column_name_with_order_matcher()
click to toggle source
# File lib/active_record/connection_adapters/oracle_enhanced/quoting.rb, line 138 def column_name_with_order_matcher COLUMN_NAME_WITH_ORDER end
type_cast(value)
click to toggle source
Calls superclass method
# File lib/active_record/connection_adapters/oracle_enhanced/quoting.rb, line 116 def type_cast(value) case value when Type::OracleEnhanced::TimestampTz::Data, Type::OracleEnhanced::TimestampLtz::Data if value.acts_like?(:time) zone_conversion_method = ActiveRecord.default_timezone == :utc ? :getutc : :getlocal value.respond_to?(zone_conversion_method) ? value.send(zone_conversion_method) : value else value end when Type::OracleEnhanced::NationalCharacterString::Data value.to_s when Type::OracleEnhanced::CharacterString::Data value else super end end
Private Instance Methods
oracle_downcase(column_name)
click to toggle source
# File lib/active_record/connection_adapters/oracle_enhanced/quoting.rb, line 171 def oracle_downcase(column_name) return nil if column_name.nil? /[a-z]/.match?(column_name) ? column_name : column_name.downcase end