Class: ActiveRecord::ConnectionAdapters::OracleAdapter

Inherits:
JdbcAdapter
  • Object
show all
Includes:
ArJdbc::Oracle, ArJdbc::Util::QuotedCache
Defined in:
lib/arjdbc/oracle/adapter.rb

Constant Summary

Constants included from ArJdbc::Oracle

ArJdbc::Oracle::ADAPTER_NAME, ArJdbc::Oracle::AUTOGENERATED_SEQUENCE_NAME, ArJdbc::Oracle::IDENTIFIER_LENGTH, ArJdbc::Oracle::NATIVE_DATABASE_TYPES

Constants inherited from JdbcAdapter

JdbcAdapter::ADAPTER_NAME

Constants included from ArJdbc::Abstract::DatabaseStatements

ArJdbc::Abstract::DatabaseStatements::NO_BINDS

Instance Attribute Summary

Attributes inherited from JdbcAdapter

#prepared_statements

Attributes included from ArJdbc::Abstract::Core

#config

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ArJdbc::Util::QuotedCache

#quote_column_name, #quote_table_name

Methods included from ArJdbc::Oracle

#adapter_name, #add_column_options!, #add_limit_offset!, #add_order_by_for_association_limiting!, arel_visitor_type, #change_column, #change_column_default, #charset, #collation, #column_name_length, #columns, #columns_for_distinct, #create_table, #current_database, #current_schema, #current_schema=, #current_user, #database_parameters, #distinct, #drop_table, #exec_insert, #exec_insert_returning, #explain, #in_clause_length, #index_name_length, #indexes, #insert, #insert_sql, #jdbc_column_class, jdbc_connection_class, #modify_types, #native_database_types, #next_sequence_value, #prefetch_primary_key?, #primary_key, #quote, #quote_column_name, #quote_raw, #quote_table_name, #quoted_date, #release_savepoint, #remove_column, #rename_column, #rename_table, #select, #sequence_name_length, #sql_for_insert, #supports_explain?, #supports_migrations?, #supports_primary_key?, #supports_savepoints?, #supports_views?, #table_alias_length, #table_definition, #table_name_length, #tables, #tablespace, #temporary_table?, #truncate, #type_to_sql, #unquote_table_name, #update_lob_value?, update_lob_values=, update_lob_values?, #use_insert_returning?

Methods inherited from JdbcAdapter

#adapter_name, #adapter_spec, arel2_visitors, #columns, configure_arel2_visitors, #data_source_exists?, #data_sources, #database_name, #exec_query_raw, #execute, #execute_quietly, #foreign_keys, #indexes, #is_a?, #jdbc_column_class, #jdbc_connection_class, #last_inserted_id, #modify_types, #native_database_types, #pk_and_sequence_for, #prepared_statements?, prepared_statements?, #primary_keys, #structure_dump, #supports_foreign_keys?, #supports_migrations?, #supports_views?, #table_definition, #table_exists?, #tables, #update_lob_value, #valid_type?, #write_large_object

Methods included from ArJdbc::Abstract::TransactionSupport

#begin_db_transaction, #begin_isolated_db_transaction, #commit_db_transaction, #create_savepoint, #exec_rollback_db_transaction, #exec_rollback_to_savepoint, #release_savepoint, #supports_savepoints?, #supports_transaction_isolation?

Methods included from ArJdbc::Abstract::DatabaseStatements

#exec_insert, #exec_query, #exec_update, #execute, #select_all

Methods included from ArJdbc::Abstract::ConnectionManagement

#active?, #disconnect!, #really_valid?, #reconnect!

Methods included from ArJdbc::Abstract::Core

#extract_raw_bind_values, #jdbc_connection, #log, #translate_exception, #translate_exception_class

Methods included from Jdbc::ConnectionPoolCallbacks

#on_checkin, #on_checkout

Constructor Details

#initialize(*args) ⇒ OracleAdapter

Returns a new instance of OracleAdapter.



845
846
847
848
849
850
851
# File 'lib/arjdbc/oracle/adapter.rb', line 845

def initialize(*args)
  ::ArJdbc::Oracle.initialize!
  super # configure_connection happens in super

  @use_insert_returning = config.key?(:insert_returning) ?
    self.class.type_cast_config_to_boolean(config[:insert_returning]) : nil
end

Class Method Details

.emulate_booleansObject

oracle-enhanced



842
# File 'lib/arjdbc/oracle/adapter.rb', line 842

def self.emulate_booleans;  ::ArJdbc::Oracle.emulate_booleans?; end

.emulate_booleans=(emulate) ⇒ Object



843
# File 'lib/arjdbc/oracle/adapter.rb', line 843

def self.emulate_booleans=(emulate); ::ArJdbc::Oracle.emulate_booleans = emulate; end

.emulate_booleans?Boolean

By default, the MysqlAdapter will consider all columns of type tinyint(1) as boolean. If you wish to disable this :

ActiveRecord::ConnectionAdapters::OracleAdapter.emulate_booleans = false

Returns:

  • (Boolean)


841
# File 'lib/arjdbc/oracle/adapter.rb', line 841

def self.emulate_booleans?; ::ArJdbc::Oracle.emulate_booleans?; end