From 4eab3758056132a73c614a9a6c090cb3e5f9e3e3 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 23 Feb 2005 23:51:34 +0000 Subject: Finished polishing API docs git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@773 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../active_record/connection_adapters/abstract_adapter.rb | 14 +------------- .../lib/active_record/connection_adapters/oci_adapter.rb | 2 +- .../active_record/connection_adapters/sqlserver_adapter.rb | 10 +++++----- 3 files changed, 7 insertions(+), 19 deletions(-) (limited to 'activerecord/lib/active_record/connection_adapters') diff --git a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb index 5d2c764afe..605a82bf74 100755 --- a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb @@ -63,18 +63,6 @@ module ActiveRecord # # The exceptions AdapterNotSpecified, AdapterNotFound and ArgumentError # may be returned on an error. - # - # == Connecting to another database for a single model - # - # To support different connections for different classes, you can - # simply call establish_connection with the classes you wish to have - # different connections for: - # - # class Courses < ActiveRecord::Base - # ... - # end - # - # Courses.establish_connection( ... ) def self.establish_connection(spec = nil) case spec when nil @@ -151,7 +139,7 @@ module ActiveRecord end # Converts all strings in a hash to symbols. - def self.symbolize_strings_in_hash(hash) + def self.symbolize_strings_in_hash(hash) #:nodoc: hash.symbolize_keys end end diff --git a/activerecord/lib/active_record/connection_adapters/oci_adapter.rb b/activerecord/lib/active_record/connection_adapters/oci_adapter.rb index 8b9b5627e0..8fb57f9c39 100644 --- a/activerecord/lib/active_record/connection_adapters/oci_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/oci_adapter.rb @@ -215,7 +215,7 @@ begin ConnectionAdapters::OCIAdapter.new conn, logger end - alias :attributes_with_quotes_pre_oci :attributes_with_quotes + alias :attributes_with_quotes_pre_oci :attributes_with_quotes #:nodoc: # Enable the id column to be bound into the sql later, by the adapter's insert method. # This is preferable to inserting the hard-coded value here, because the insert method # needs to know the id value explicitly. diff --git a/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb index d221f99be3..f6325d845c 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb @@ -10,7 +10,7 @@ require 'active_record/connection_adapters/abstract_adapter' # module ActiveRecord class Base - def self.sqlserver_connection(config) + def self.sqlserver_connection(config) #:nodoc: require_library_or_gem 'dbi' unless self.class.const_defined?(:DBI) symbolize_strings_in_hash(config) @@ -25,10 +25,6 @@ module ActiveRecord raise ArgumentError, "No database specified. Missing argument: database." end - def adapter_name() - 'SqlServer' - end - conn = DBI.connect("DBI:ADO:Provider=SQLOLEDB;Data Source=#{host};Initial Catalog=#{database};User Id=#{username};Password=#{password};") conn["AutoCommit"] = true @@ -295,6 +291,10 @@ EOL end end + def adapter_name() + 'SqlServer' + end + private def select(sql, name = nil) rows = [] -- cgit v1.2.3