activerecord-sqlserver-adapter 5.1.2 → 5.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/CHANGELOG.md +21 -0
- data/VERSION +1 -1
- data/appveyor.yml +1 -1
- data/circle.yml +1 -1
- data/lib/active_record/connection_adapters/sqlserver/database_statements.rb +2 -2
- data/lib/active_record/connection_adapters/sqlserver_adapter.rb +8 -5
- data/test/bin/setup.sh +1 -1
- data/test/config.yml +2 -2
- metadata +2 -3
- data/RAILS5-TODO.md +0 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a40800fd3d59fb80d22946187334124093a6060
|
4
|
+
data.tar.gz: af15e951258df52f8a44807d7e891d2da354d8f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3cd2dd2f39983e7c4b4267666e6960f8f93bf493bab25711e6cbc0b7ab3b41fe134ffb944c6e973b2e19c151a4551ffe669aa66135d708eaf738a73c42abc6b
|
7
|
+
data.tar.gz: bf31bc039ef3250071b784046b5cb6619797692553015f9b96da51b3bb2b08f03b6f676a7634326ba28b79e98c9aa105a3325e39008064adb79afd09f7ca08da
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,24 @@
|
|
1
|
+
## v5.1.5
|
2
|
+
|
3
|
+
#### Fixed
|
4
|
+
|
5
|
+
* Memoize `@@version` queries. Fixes #632
|
6
|
+
|
7
|
+
|
8
|
+
## v5.1.4
|
9
|
+
|
10
|
+
#### Fixed
|
11
|
+
|
12
|
+
* Add case insensitive comparison for better performance with CI collations. Fixes #624
|
13
|
+
|
14
|
+
|
15
|
+
## v5.1.3
|
16
|
+
|
17
|
+
#### Fixed
|
18
|
+
|
19
|
+
* Use bigint type in sqlserver_type when needed. Fixes #616
|
20
|
+
|
21
|
+
|
1
22
|
## v5.1.2
|
2
23
|
|
3
24
|
#### Fixed
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
5.1.
|
1
|
+
5.1.5
|
data/appveyor.yml
CHANGED
data/circle.yml
CHANGED
@@ -84,7 +84,7 @@ module ActiveRecord
|
|
84
84
|
end
|
85
85
|
|
86
86
|
def can_perform_case_insensitive_comparison_for?(column)
|
87
|
-
column.type == :string
|
87
|
+
column.type == :string && (!column.collation || column.case_sensitive?)
|
88
88
|
end
|
89
89
|
private :can_perform_case_insensitive_comparison_for?
|
90
90
|
|
@@ -247,7 +247,7 @@ module ActiveRecord
|
|
247
247
|
return attr.type.sqlserver_type if attr.type.respond_to?(:sqlserver_type)
|
248
248
|
case value = attr.value_for_database
|
249
249
|
when Numeric
|
250
|
-
'int'.freeze
|
250
|
+
value > 2_147_483_647 ? 'bigint'.freeze : 'int'.freeze
|
251
251
|
else
|
252
252
|
'nvarchar(max)'.freeze
|
253
253
|
end
|
@@ -435,11 +435,14 @@ module ActiveRecord
|
|
435
435
|
end
|
436
436
|
|
437
437
|
def version_year
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
438
|
+
return @version_year if defined?(@version_year)
|
439
|
+
@version_year = begin
|
440
|
+
vstring = _raw_select('SELECT @@version', fetch: :rows).first.first.to_s
|
441
|
+
return 2016 if vstring =~ /vNext/
|
442
|
+
/SQL Server (\d+)/.match(vstring).to_a.last.to_s.to_i
|
443
|
+
rescue Exception => e
|
444
|
+
2016
|
445
|
+
end
|
443
446
|
end
|
444
447
|
|
445
448
|
end
|
data/test/bin/setup.sh
CHANGED
data/test/config.yml
CHANGED
@@ -19,7 +19,7 @@ connections:
|
|
19
19
|
dataserver: <%= ENV['ACTIVERECORD_UNITTEST_DATASERVER'] %>
|
20
20
|
tds_version: <%= ENV['ACTIVERECORD_UNITTEST_TDSVERSION'] %>
|
21
21
|
azure: <%= !ENV['ACTIVERECORD_UNITTEST_AZURE'].nil? %>
|
22
|
-
timeout: <%= ENV['ACTIVERECORD_UNITTEST_AZURE'].present? ? 20 :
|
22
|
+
timeout: <%= ENV['ACTIVERECORD_UNITTEST_AZURE'].present? ? 20 : 10 %>
|
23
23
|
arunit2:
|
24
24
|
<<: *default_connection_info
|
25
25
|
database: activerecord_unittest2
|
@@ -27,5 +27,5 @@ connections:
|
|
27
27
|
dataserver: <%= ENV['ACTIVERECORD_UNITTEST_DATASERVER'] %>
|
28
28
|
tds_version: <%= ENV['ACTIVERECORD_UNITTEST_TDSVERSION'] %>
|
29
29
|
azure: <%= !ENV['ACTIVERECORD_UNITTEST_AZURE'].nil? %>
|
30
|
-
timeout: <%= ENV['ACTIVERECORD_UNITTEST_AZURE'].present? ? 20 :
|
30
|
+
timeout: <%= ENV['ACTIVERECORD_UNITTEST_AZURE'].present? ? 20 : 10 %>
|
31
31
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-sqlserver-adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.1.
|
4
|
+
version: 5.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ken Collins
|
@@ -14,7 +14,7 @@ authors:
|
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
|
-
date: 2017-
|
17
|
+
date: 2017-12-29 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: activerecord
|
@@ -60,7 +60,6 @@ files:
|
|
60
60
|
- Gemfile
|
61
61
|
- Guardfile
|
62
62
|
- MIT-LICENSE
|
63
|
-
- RAILS5-TODO.md
|
64
63
|
- README.md
|
65
64
|
- RUNNING_UNIT_TESTS.md
|
66
65
|
- Rakefile
|
data/RAILS5-TODO.md
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
|
2
|
-
## Rails v5.1
|
3
|
-
|
4
|
-
* BIGINT PK support. https://github.com/rails/rails/pull/26266
|
5
|
-
* Raise `ActiveRecord::NotNullViolation` when a record cannot be inserted
|
6
|
-
or updated because it would violate a not null constraint.
|
7
|
-
* Raise `ActiveRecord::RangeError` when values that executed are out of range.
|
8
|
-
* Allow passing extra flags to `db:structure:load` and `db:structure:dump`
|
9
|
-
Introduces `ActiveRecord::Tasks::DatabaseTasks.structure_(load|dump)_flags` to customize the
|
10
|
-
eventual commands run against the database, e.g. mysqldump/pg_dump.
|
11
|
-
* Set `:time` as a timezone aware type and remove deprecation when
|
12
|
-
`config.active_record.time_zone_aware_types` is not explicitly set.
|
13
|
-
* Remove deprecated support to passing a column to `#quote`.
|
14
|
-
* `#tables` and `#table_exists?` return only tables and not views.
|
15
|
-
All the deprecations on those methods were removed.
|
16
|
-
* Remove deprecated `original_exception` argument in `ActiveRecord::StatementInvalid#initialize`
|
17
|
-
and `ActiveRecord::StatementInvalid#original_exception`.
|
18
|
-
* Remove deprecated tasks: `db:test:clone`, `db:test:clone_schema`, `db:test:clone_structure`.
|
19
|
-
* Make `table_name=` reset current statement cache,
|
20
|
-
so queries are not run against the previous table name.
|
21
|
-
* Deprecate using `#quoted_id` in quoting.
|
22
|
-
* Deprecate `supports_migrations?` on connection adapters.
|
23
|
-
* Dig moving `Column#sqlserver_options` to `sql_type_metadata` delegate.
|
24
|
-
* Should we do like PG and add `options[:collation]` before `#add_column_options!`?
|
25
|
-
* Translated exceptions: `SerializationFailure` and `RangeError`.
|