Module: ActiveRecord::ConnectionAdapters::Sqlserver::CoreExt::ODBC::Database

Defined in:
lib/active_record/connection_adapters/sqlserver/core_ext/odbc.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.parent_modulesObject



31
32
33
# File 'lib/active_record/connection_adapters/sqlserver/core_ext/odbc.rb', line 31

def self.parent_modules
  @parent_module ||= ['ODBC','ODBC_UTF8','ODBC_NONE'].map{ |odbc_ns| odbc_ns.constantize rescue nil }.compact
end

.parent_modules_error_exceptionsObject



35
36
37
# File 'lib/active_record/connection_adapters/sqlserver/core_ext/odbc.rb', line 35

def self.parent_modules_error_exceptions
  @parent_modules_error_exceptions ||= parent_modules.map { |odbc_ns| "::#{odbc_ns}::Error".constantize }
end

Instance Method Details

#run_block(*args) {|sth = run(*args)| ... } ⇒ Object

Yields:

  • (sth = run(*args))


39
40
41
42
# File 'lib/active_record/connection_adapters/sqlserver/core_ext/odbc.rb', line 39

def run_block(*args)
  yield sth = run(*args)
  sth.drop
end