MASTER * 2.3.7 * Correctly use :date/:time SQL types in 2008 [Ken Collins] * 2.3.6 * Allow DNS's to not contain a database and use what is in database.yml [Marco Mastrodonato] * Rake tasks methods for vanallia rails :db namespace parity. [Ken Collins] * IronRuby integrated security fixes [Jimmy Schementi] * 2.3.5 * Initial IronRuby ADONET connection mode support baked right in. Removed most &block parameters, no handle/request object yielded anymore. Better abstraction and compliance per the ActiveRecord abstract adapter to not yielding handles for #execute and only for low level #select. Better wrapping of all queries at lowest level in #log so exceptions at anytime can be handled correctly by core AR. Critical for System::Data's command readers. Better abstraction for introspecting on #connection_mode. Added support for running singular test cases via TextMate's Command-R. [Ken Collins] * Force a binary encoding on values coming in and out of those columns for ruby 1.9. Fixes ticket #33 [Jeroen Zwartepoorte] * Using change_column will leave default if the type does not change or a new default is not included. Fixes issue #22. [Ransom Briggs] * Use correct SP name for sp_MSforeachtable so any collation can get to it. [7to3] * Qualify INFORMATION_SCHEMA.COLUMNS with a correct period DB name if present. * Allow adapter to return multipe results sets, for example from stored procedures. [Chris Hall] * 2.3.4 * For tables that named with schema(ex. rails.users), they could not get length of column. column of varchar(40) gets length => nil. Ticket #27 & #15 [Ken Tachiya] * Altered limited_update_conditions regex conditions, the .* would greedily fail if the where_sql had WHERE in a table or field, etc. [Ransom Briggs] * Changing test to allow ENV['ARUNIT_DB_NAME'] as the database name for the test units. Matches up with AR conventions. [Ransom Briggs] 2.3.3 * Revert #ad83df82 and again cache column information at the connection's instance. The previous commit was causing all sorts of view and schema reflection problems. [Ken Collins] 2.3.2 * Insert queries that include the word "insert" as a partial column name with the word "id" as a value were falsely being matched as identity inserts. [Sean Caffery/bfabry] * Delegate all low level #raw_connection calls to #raw_connection_run and #raw_connection_do which abstract out the low level modes in the connection options at that point. [Ken Collins] * Remove DBI dependency and go straight ODBC for speed improvement [Erik Bryn] * Leave order by alone when same column crosses two tables [Ransom Briggs] * 2.3 * (December 1st, 2009) * Table and column aliases can handle many. Resolves ticket #19 [stonegao] * Coerce a few tests that were failing in 2.3.x [Ken Collins] * Change column/view cache to happen at class level. Allows connection pool to share same caches as well as the ability to expire the caches when needed. Also fix change_column so that exceptions are not raised when the column contains an existing default. [Ken Collins] * Allow query_requires_identity_insert? method to return quoted table name in situations where the INSERT parts are not quoted themselves. [Gary/iawgens, Richard Penwell, Ken Collins] * Fixed namespace in calling test_sqlserver_odbc within test_unicode_types. [Gary/iawgens] * Columns with multi-line defaults work correctly. [bfabry] * 2.2.22 * (October 15th, 2009) * Support Identity-key-column judgement on multiple schema environment [Ken Tachiya] * Add support for tinyint data types. In MySQL all these types would be boolean, however in our adapter, they will use the full 1 => 255 Fixnum value as you would expect. [Ken Collins] * 2.2.21 * (September 10th, 2009) * Changes for gem best practices per http://weblog.rubyonrails.org/2009/9/1/gem-packaging-best-practices Details of such are as follows: [Ken Collins] - Removed rails-sqlserver-2000-2005-adapter.rb load file for old github usage. - Move the core_ext directory to active_record/connection_adapters/sqlserver_adapter/core_ext - Renamespace SQLServerDBI to ActiveRecord::ConnectionAdapters::SQLServerCoreExtensions::DBI - Renamespace ActiveRecord::ConnectionAdapters::SQLServerActiveRecordExtensions to ActiveRecord::ConnectionAdapters::SQLServerCoreExtensions::ActiveRecord * 2.2.20 * (September 10th, 2009) * Implement a new remove_default_constraint method that uses sp_helpconstraint [Ken Collins] * Use a lazy match in add_order_by_for_association_limiting! to allow sub selects to be used. Resolves ticket #11. * Add default rake task back for testing. Runs the namespaced sqlserver:test_sqlserver_odbc. Resolves ticket #10 [Ken Collins] * Default value detection in column_definitions is kinder to badly formatted, or long winded user defined functions, for default values. Resolves ticket #8 [Ken Collins] * Make sure bigint SQL Server data type can be used and converted back to Bignum as expected. [Ken Collins] * 2.2.19 * (June 19th, 2009) * Leave quoted column names as is. Resolves ticket #36 [Vince Puzzella] * Changing add_limit! in ActiveRecord::Base for SQLServer so that it passes through any scoped :order parameters. Resolves ticket #35 [Murray Steele] * 2.2.18 * (June 5th, 2009) * Column reflection on table name rescues LoadError and a few others. Resolves tickets #25 & #33 [Ken Collins] * Added 2008 support. Resolves ticket #32 [Ken Collins] * 2.2.17 * (May 14th, 2009) * Add simplified type recognition for varchar(max) and nvarchar(max) under SQL Server 2005 to be a :text type. This ensures schema dumper does the right thing. Fixes ticket #30. [Ken Collins] * Tested ruby 1.9, ruby-odbc 0.9996, and DBI 0.4.1. Also added correct support for UTF-8 character encoding going in and out of the DB. See before gist http://gist.github.com/111709 and after gist http://gist.github.com/111719 [Ken Collins] * 2.2.16 * (April 21st, 2009) * Make add_limit_offset! only add locking hints (for tally) when the :lock option is present. Added tests to make sure tally SQL is augmented correctly and tests to make sure that add_lock! is doing what it needs for deep sub selects in paginated results. [Ken Collins] * Add auto reconnect support utilizing a new #with_auto_reconnect block. By default each query run through the adapter will automatically reconnect at standard intervals, logging attempts along the way, till success or the original exception bubbles up. See docs for more details. Resolves ticket #18 [Ken Collins] * Update internal helper method #orders_and_dirs_set to cope with an order clause like "description desc". This resolves ticket #26 [Ken Collins] * Provide support for running queries at different isolation levels using #run_with_isolation_level method that can take a block or not. Also implement a #user_options method that reflects on the current user session values. Resolves #20 [Murray Steele] * 2.2.15 * (March 23rd, 2009) * Better add_lock! method that can add the lock to just about all the elements in the statement. This could be eager loaded associations, joins, etc. Done so that paginated results can easily add lock options for performance. Note, the tally count in add_limit_offset! use "WITH (NOLOCK)" explicitly as it can not hurt and is needed. [Ken Collins] * 2.2.14 * (March 17th, 2009) * Rails2.3 - Back passing tests on 2.2 work. Includes: (1) Created new test helpers that check ActiveRecord version strings so we can conditionally run 2.2 and 2.3 tests. (2) Making TransactionTestSqlserver use Ship vs Bird model. Also made it conditional run a few blocks for different versions of ActiveRecord. (3) Previous JoinDependency#aliased_table_name_for is now only patched in ActiveRecord equal or greater than 2.3. [Ken Collins] * Rails2.3 - Implement new savepoint support [Ken Collins] http://rails.lighthouseapp.com/projects/8994/tickets/383 http://www.codeproject.com/KB/database/sqlservertransactions.aspx * Rails2.3 - Coerce NestedScopingTest#test_merged_scoped_find to use correct regexp for adapter. [Ken Collins] * Rails2.3 - Implement a custom ActiveRecord::Associations::ClassMethods::JoinDependency::JoinAssociation#aliased_table_name_for method that uses a Regexp.escape so that table/column quoting does not get ignored. [Ken Collins] * Rails2.3 - Implement #outside_transaction? and a new transaction test case to test some SQL Server basic support while implementing this method. Future home of some savepoint tests too. [Ken Collins] * Rails2.3 - Coerced tests that ensure hash conditions on referenced tables are considered when eager loading with limit/offset. Information on these changes and the ticket in rails are. http://github.com/rails/rails/commit/9a4d557713acb0fc8e80f61af18094034aca029a http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1404-conditions_tables-doesnt-understand-condition-hashes * Rails2.3 - Add coerced tests for true/false attributes in selects use SQL Server case statement. [Ken Collins] * Making sure that smalldatetime types are OK to use. Also fixed a bug in the #view_information method that checks to see if a view definition is equal to 4000 chars, meaning that it is most likely truncated and needs to use the backup method of sp_helptext to get it's view definition. [Ken Collins] * 2.2.13 * (February 10th, 2009) * Update #indexes to use unqualified table name. Fixes cases where users may decide to use table name prefixes like 'dbo.'. [Ken Collins] * 2.2.12 * (February 8th, 2009) * Update table_exists? to work with qualified table names that may include an user prefix. [Ken Collins] * 2.2.10/11 * (January 22nd, 2009) * Add a rails-sqlserver-2000-2005-adapter.rb file so that long :lib option for config.gem is no longer needed. * 2.2.9 * (January 22nd, 2009) * Fixing a small bug in the deprecated DBI::Timestamp conversion so it correctly converts nanosecond whole numbers to back to pre type cast SQL Server milliseconds, ultimately allow ruby's Time#usec which is microseconds to be correct. [Ken Collins] * Sometimes views are more than 4000 chars long and will return NULL for the VIEW_DEFINITION. If so, use sp_helptext procedure as a backup method. [Ken Collins] * 2.2.8 (January 9th, 2009) * Update execute_procedure method a bit to remove excess code. [Ken Collins] * 2.2.7 (January 9th, 2009) * Created a connection#execute_procedure method that takes can take any number of ruby objects as variables and quotes them according to the connection's rules. Also added an ActiveRecord::Base class level core extension that hooks into this. It also checks if the connection responds to #execute_procedure and if not returns an empty array. [Ken Collins] * Added a #enable_default_unicode_types class attribute access to make all new added or changed string types like :string/:text default to unicode/national data types. See the README for full details. Added a rake task that assists setting this to true when running tests. [Ken Collins] * 2.2.6 (January 8th, 2009) * Introduced a bug in 2.2.5 in the #add_order! core ext for ActiveRecord. Fixed [Ken Collins] * 2.2.5 (January 4th, 2009) * Added a log_info_schema_queries class attribute and make all queries to INFORMATION_SCHEMA silent by default. [Ken Collins] * Fix millisecond support in datetime columns. ODBC::Timestamp incorrectly takes SQL Server milliseconds and applies them as nanoseconds. We cope with this at the DBI layer by using SQLServerDBI::Type::SqlserverTimestamp class to parse the before type cast value appropriately. Also update the adapters #quoted_date method to work more simply by converting ruby's #usec milliseconds to SQL Server microseconds. [Ken Collins] * Core extensions for ActiveRecord now reflect on the connection before doing SQL Server things. Now this adapter is compatible for using with other adapters. [Ken Collins] * 2.2.4 (December 5th, 2008) * Fix a type left in #views_real_column_name. Also cache #view_information lookups. [Ken Collins] * 2.2.3 (December 5th, 2008) * Changing back to using real table name in column_definitions. Makes sure views get back only the columns that are defined for them with correct names, etc. Now supporting views by looking for NULL default and then if table name is a view, perform a targeted with sub select to the real table name and column name to find true default. [Ken Collins] * Ensure that add_limit_offset! does not alter sub queries. [Erik Bryn] 2.2.2 (December 2nd, 2008) * Add support for view defaults by making column_definitions use real table name for schema info. [Ken Collins] * Include version in connection method and inspection. [Ken Collins] 2.2.1 (November 25th, 2008) * Add identity insert support for views. Cache #views so that identity #table_name_or_views_table_name will run quickly. [Ken Collins] * Add views support. ActiveRecord classes can use views. The connection now has a #views method and #table_exists? will now fall back to checking views too. [Ken Collins] 2.2.0 (November 21st, 2008) * Release for rails 2.2.2. Many many changes. [Ken Collins], [Murray Steele], [Shawn Balestracci], [Joe Rafaniello]