Class: ODBCAdapter::Adapters::NullODBCAdapter

Inherits:
ActiveRecord::ConnectionAdapters::ODBCAdapter show all
Defined in:
lib/odbc_adapter/adapters/null_odbc_adapter.rb

Overview

A default adapter used for databases that are no explicitly listed in the registry. This allows for minimal support for DBMSs for which we don’t have an explicit adapter.

Defined Under Namespace

Classes: BindSubstitution

Constant Summary

Constants inherited from ActiveRecord::ConnectionAdapters::ODBCAdapter

ActiveRecord::ConnectionAdapters::ODBCAdapter::ADAPTER_NAME, ActiveRecord::ConnectionAdapters::ODBCAdapter::BOOLEAN_TYPE, ActiveRecord::ConnectionAdapters::ODBCAdapter::ERR_CONNECTION_FAILED_MESSAGE, ActiveRecord::ConnectionAdapters::ODBCAdapter::ERR_CONNECTION_FAILED_REGEX, ActiveRecord::ConnectionAdapters::ODBCAdapter::ERR_DUPLICATE_KEY_VALUE, ActiveRecord::ConnectionAdapters::ODBCAdapter::ERR_QUERY_TIMED_OUT, ActiveRecord::ConnectionAdapters::ODBCAdapter::ERR_QUERY_TIMED_OUT_MESSAGE

Constants included from DatabaseStatements

DatabaseStatements::SQL_NO_NULLS, DatabaseStatements::SQL_NULLABLE, DatabaseStatements::SQL_NULLABLE_UNKNOWN

Instance Attribute Summary

Attributes inherited from ActiveRecord::ConnectionAdapters::ODBCAdapter

#database_metadata

Instance Method Summary collapse

Methods inherited from ActiveRecord::ConnectionAdapters::ODBCAdapter

#active?, #adapter_name, #disconnect!, #initialize, #new_column, #reconnect!

Methods included from SchemaStatements

#columns, #current_database, #foreign_keys, #index_name, #indexes, #native_database_types, #primary_key, #tables, #views

Methods included from Quoting

#quote_column_name, #quote_string, #quoted_date

Methods included from DatabaseStatements

#begin_db_transaction, #commit_db_transaction, #default_sequence_name, #exec_delete, #exec_query, #exec_rollback_db_transaction, #execute

Methods included from DatabaseLimits

#table_alias_length

Constructor Details

This class inherits a constructor from ActiveRecord::ConnectionAdapters::ODBCAdapter

Instance Method Details

#arel_visitorObject

Using a BindVisitor so that the SQL string gets substituted before it is sent to the DBMS (to attempt to get as much coverage as possible for DBMSs we don’t support).



14
15
16
# File 'lib/odbc_adapter/adapters/null_odbc_adapter.rb', line 14

def arel_visitor
  BindSubstitution.new(self)
end

#prepared_statementsObject

Explicitly turning off prepared_statements in the null adapter because there isn’t really a standard on which substitution character to use.



20
21
22
# File 'lib/odbc_adapter/adapters/null_odbc_adapter.rb', line 20

def prepared_statements
  false
end

#supports_migrations?Boolean

Turning off support for migrations because there is no information to go off of for what syntax the DBMS will expect.

Returns:

  • (Boolean)


26
27
28
# File 'lib/odbc_adapter/adapters/null_odbc_adapter.rb', line 26

def supports_migrations?
  false
end