From 1dc0b2a96095695fabd9210a401484cd5b82146f Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 23 Feb 2005 17:03:12 +0000 Subject: Added documentation for database adapters to visible RDoc git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@771 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../connection_adapters/sqlserver_adapter.rb | 38 ++++++++++------------ 1 file changed, 18 insertions(+), 20 deletions(-) (limited to 'activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb') diff --git a/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb index 7bddba9b5b..d221f99be3 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb @@ -5,24 +5,6 @@ require 'active_record/connection_adapters/abstract_adapter' # Author: Joey Gibson # Date: 10/14/2004 # -# REQUIREMENTS: -# -# This adapter will ONLY work on Windows systems, since it relies on Win32OLE, which, -# to my knowledge, is only available on Window. -# -# It 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 need to create -# the ADO directory). Once you've installed that file, you are ready to go. -# -# This module uses the ADO-style DSNs for connection. For example: -# "DBI:ADO:Provider=SQLOLEDB;Data Source=(local);Initial Catalog=test;User Id=sa;Password=password;" -# with User Id replaced with your proper login, and Password with your -# password. -# # I have tested this code on a WindowsXP Pro SP1 system, # ruby 1.8.2 (2004-07-29) [i386-mswin32], SQL Server 2000. # @@ -128,8 +110,24 @@ module ActiveRecord end - class SQLServerAdapter < AbstractAdapter # :nodoc: - + # This adapter will ONLY work on Windows systems, since it relies on Win32OLE, which, + # to my knowledge, is only available on Window. + # + # It 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 need to create + # the ADO directory). Once you've installed that file, you are ready to go. + # + # Options: + # + # * :host -- Defaults to localhost + # * :username -- Defaults to sa + # * :password -- Defaults to nothing + # * :database -- The name of the database. No default, must be provided. + class SQLServerAdapter < AbstractAdapter def select_all(sql, name = nil) add_limit!(sql, nil) select(sql, name) -- cgit v1.2.3