activerecord-sqlserver-adapter 2.3.7 → 2.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG
CHANGED
@@ -170,7 +170,7 @@ module ActiveRecord
|
|
170
170
|
class SQLServerAdapter < AbstractAdapter
|
171
171
|
|
172
172
|
ADAPTER_NAME = 'SQLServer'.freeze
|
173
|
-
VERSION = '2.3.
|
173
|
+
VERSION = '2.3.8'.freeze
|
174
174
|
DATABASE_VERSION_REGEXP = /Microsoft SQL Server\s+(\d{4})/
|
175
175
|
SUPPORTED_VERSIONS = [2000,2005,2008].freeze
|
176
176
|
LIMITABLE_TYPES = ['string','integer','float','char','nchar','varchar','nvarchar'].freeze
|
@@ -420,7 +420,7 @@ module ActiveRecord
|
|
420
420
|
|
421
421
|
def use_database(database=nil)
|
422
422
|
database ||= @connection_options[:database]
|
423
|
-
do_execute "USE #{database}" unless database.blank?
|
423
|
+
do_execute "USE #{quote_table_name(database)}" unless database.blank?
|
424
424
|
end
|
425
425
|
|
426
426
|
def outside_transaction?
|
@@ -753,7 +753,7 @@ module ActiveRecord
|
|
753
753
|
retry_count = 0
|
754
754
|
max_retries = 1
|
755
755
|
begin
|
756
|
-
do_execute "DROP DATABASE #{database}"
|
756
|
+
do_execute "DROP DATABASE #{quote_table_name(database)}"
|
757
757
|
rescue ActiveRecord::StatementInvalid => err
|
758
758
|
if err.message =~ /because it is currently in use/i
|
759
759
|
raise if retry_count >= max_retries
|
@@ -767,7 +767,7 @@ module ActiveRecord
|
|
767
767
|
end
|
768
768
|
|
769
769
|
def create_database(database)
|
770
|
-
do_execute "CREATE DATABASE #{database}"
|
770
|
+
do_execute "CREATE DATABASE #{quote_table_name(database)}"
|
771
771
|
end
|
772
772
|
|
773
773
|
def current_database
|
@@ -782,11 +782,11 @@ module ActiveRecord
|
|
782
782
|
# http://sqlserver2000.databases.aspfaq.com/how-do-i-drop-a-sql-server-database.html
|
783
783
|
def remove_database_connections_and_rollback(database=nil)
|
784
784
|
database ||= current_database
|
785
|
-
do_execute "ALTER DATABASE #{database} SET SINGLE_USER WITH ROLLBACK IMMEDIATE"
|
785
|
+
do_execute "ALTER DATABASE #{quote_table_name(database)} SET SINGLE_USER WITH ROLLBACK IMMEDIATE"
|
786
786
|
begin
|
787
787
|
yield
|
788
788
|
ensure
|
789
|
-
do_execute "ALTER DATABASE #{database} SET MULTI_USER"
|
789
|
+
do_execute "ALTER DATABASE #{quote_table_name(database)} SET MULTI_USER"
|
790
790
|
end if block_given?
|
791
791
|
end
|
792
792
|
|
@@ -10,7 +10,7 @@ ActiveRecord::Base.configurations = {
|
|
10
10
|
:mode => 'ODBC',
|
11
11
|
:host => 'localhost',
|
12
12
|
:username => 'rails',
|
13
|
-
:dsn => 'activerecord_unittest',
|
13
|
+
:dsn => ENV['ACTIVERECORD_UNITTEST_DSN'] || 'activerecord_unittest',
|
14
14
|
:database => 'activerecord_unittest'
|
15
15
|
},
|
16
16
|
'arunit2' => {
|
@@ -18,7 +18,7 @@ ActiveRecord::Base.configurations = {
|
|
18
18
|
:mode => 'ODBC',
|
19
19
|
:host => 'localhost',
|
20
20
|
:username => 'rails',
|
21
|
-
:dsn => 'activerecord_unittest2',
|
21
|
+
:dsn => ENV['ACTIVERECORD_UNITTEST2_DSN'] || 'activerecord_unittest2',
|
22
22
|
:database => 'activerecord_unittest2'
|
23
23
|
}
|
24
24
|
}
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 2
|
7
7
|
- 3
|
8
|
-
-
|
9
|
-
version: 2.3.
|
8
|
+
- 8
|
9
|
+
version: 2.3.8
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Ken Collins
|
@@ -18,7 +18,7 @@ autorequire:
|
|
18
18
|
bindir: bin
|
19
19
|
cert_chain: []
|
20
20
|
|
21
|
-
date: 2010-
|
21
|
+
date: 2010-06-07 00:00:00 -04:00
|
22
22
|
default_executable:
|
23
23
|
dependencies: []
|
24
24
|
|