diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index cf7d834af41860c84ea6a9b190579cde1503a8bd..0e4cf285c83fcc3ccc0ec1a63806b9dfec7a68c3 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -1,4 +1,4 @@ -*SVN* +*1.11.0* (5th July, 2005) * Changed logging of SQL statements to use the DEBUG level instead of INFO diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index 42e5a9f1c789f045508809dda125ea2a570fc997..419187015b838426cfb75ad892d0c735c8ac0034 100755 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -96,7 +96,7 @@ def clear_association_cache #:nodoc: # * You can add an object to a collection without automatically saving it by using the #collection.build method (documented below). # * All unsaved (new_record? == true) members of the collection are automatically saved when the parent is saved. # - # === Callbacks + # === Association callbacks # # Similiar to the normal callbacks that hook into the lifecycle of an Active Record object, you can also define callbacks that get # trigged when you add an object to or removing an object from a association collection. Example: @@ -112,7 +112,7 @@ def clear_association_cache #:nodoc: # It's possible to stack callbacks by passing them as an array. Example: # # class Project - # has_and_belongs_to_many :developers, :after_add => [:evaluate_velocity, Proc.new {|project, developer| project.shipping_date = Time.now}] + # has_and_belongs_to_many :developers, :after_add => [:evaluate_velocity, Proc.new { |p, d| p.shipping_date = Time.now}] # end # # Possible callbacks are: before_add, after_add, before_remove and after_remove. diff --git a/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb index a5dc5a0faf8bdc98c858da0bfc926e77b04e6b8e..0ce5f39421a6304068c1cf501b00efd386760b35 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb @@ -11,47 +11,6 @@ # Modifications (ODBC): Mark Imbriaco # Date: 6/26/2005 # -# In ADO mode, this adapter will ONLY work on Windows systems, -# since it relies on Win32OLE, which, to my knowledge, is only -# available on Windows. -# -# This mode also relies on the ADO support in the DBI module. If you are using the -# one-click installer of Ruby, then you already have DBI installed, but -# the ADO module is *NOT* installed. You will need to get the latest -# source distribution of Ruby-DBI from http://ruby-dbi.sourceforge.net/ -# unzip it, and copy the file -# src/lib/dbd_ado/ADO.rb -# to -# X:/Ruby/lib/ruby/site_ruby/1.8/DBD/ADO/ADO.rb -# (you will more than likely need to create the ADO directory). -# Once you've installed that file, you are ready to go. -# -# In ODBC mode, the adapter requires the ODBC support in the DBI module which requires -# the Ruby ODBC module. Ruby ODBC 0.996 was used in development and testing, -# and it is available at http://www.ch-werner.de/rubyodbc/ -# -# Options: -# -# * :mode -- ADO or ODBC. Defaults to ADO. -# * :username -- Defaults to sa. -# * :password -- Defaults to empty string. -# -# ADO specific options: -# -# * :host -- Defaults to localhost. -# * :database -- The name of the database. No default, must be provided. -# -# ODBC specific options: -# -# * :dsn -- Defaults to nothing. -# -# ADO code tested on Windows 2000 and higher systems, -# running ruby 1.8.2 (2004-07-29) [i386-mswin32], and SQL Server 2000 SP3. -# -# ODBC code tested on a Fedora Core 4 system, running FreeTDS 0.63, -# unixODBC 2.2.11, Ruby ODBC 0.996, Ruby DBI 0.0.23 and Ruby 1.8.2. -# [Linux strongmad 2.6.11-1.1369_FC4 #1 Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux] -# module ActiveRecord class Base def self.sqlserver_connection(config) #:nodoc: @@ -160,9 +119,48 @@ def binary_to_string(value) end end end + end - end #class ColumnWithIdentity < Column - + # In ADO mode, this adapter will ONLY work on Windows systems, + # since it relies on Win32OLE, which, to my knowledge, is only + # available on Windows. + # + # This mode also relies on the ADO support in the DBI module. If you are using the + # one-click installer of Ruby, then you already have DBI installed, but + # the ADO module is *NOT* installed. You will need to get the latest + # source distribution of Ruby-DBI from http://ruby-dbi.sourceforge.net/ + # unzip it, and copy the file + # src/lib/dbd_ado/ADO.rb + # to + # X:/Ruby/lib/ruby/site_ruby/1.8/DBD/ADO/ADO.rb + # (you will more than likely need to create the ADO directory). + # Once you've installed that file, you are ready to go. + # + # In ODBC mode, the adapter requires the ODBC support in the DBI module which requires + # the Ruby ODBC module. Ruby ODBC 0.996 was used in development and testing, + # and it is available at http://www.ch-werner.de/rubyodbc/ + # + # Options: + # + # * :mode -- ADO or ODBC. Defaults to ADO. + # * :username -- Defaults to sa. + # * :password -- Defaults to empty string. + # + # ADO specific options: + # + # * :host -- Defaults to localhost. + # * :database -- The name of the database. No default, must be provided. + # + # ODBC specific options: + # + # * :dsn -- Defaults to nothing. + # + # ADO code tested on Windows 2000 and higher systems, + # running ruby 1.8.2 (2004-07-29) [i386-mswin32], and SQL Server 2000 SP3. + # + # ODBC code tested on a Fedora Core 4 system, running FreeTDS 0.63, + # unixODBC 2.2.11, Ruby ODBC 0.996, Ruby DBI 0.0.23 and Ruby 1.8.2. + # [Linux strongmad 2.6.11-1.1369_FC4 #1 Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux] class SQLServerAdapter < AbstractAdapter def native_database_types { diff --git a/activerecord/lib/active_record/query_cache.rb b/activerecord/lib/active_record/query_cache.rb index 368b08e5066ff9efab1d44ae6a343c446cf853f7..95b4d8c9151dcdc508cbec03e06b2b0ced4168db 100644 --- a/activerecord/lib/active_record/query_cache.rb +++ b/activerecord/lib/active_record/query_cache.rb @@ -1,5 +1,5 @@ module ActiveRecord - class QueryCache + class QueryCache #:nodoc: def initialize(connection) @connection = connection @query_cache = {} @@ -56,7 +56,7 @@ def self.connection=(spec) end end - class AbstractAdapter + class AbstractAdapter #:nodoc: # Stub method to be able to treat the connection the same whether the query cache has been turned on or not def clear_query_cache end