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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a08a277e4b09e7e807a8e814dbe442a5f819f605
4
- data.tar.gz: d05b3a0be20f6c353430b300e78a80952585582d
3
+ metadata.gz: 2a40800fd3d59fb80d22946187334124093a6060
4
+ data.tar.gz: af15e951258df52f8a44807d7e891d2da354d8f0
5
5
  SHA512:
6
- metadata.gz: d66aed80923e34eaa44a3ef7b2845dc1a6a54699a4bfaeb84caab648dee603ddbf2a78d0afd974853e757d8e6eb041426806ee41a77f15b303b7dbf81051d699
7
- data.tar.gz: 2b35fd5e358b1178ef89b1bf0b7bff8f005d9f3cc585dd17a40f9bb5eb097e59151a964edbca5753df879374737bb5667ed51d63b5500482a8a6af24fb6d0da6
6
+ metadata.gz: f3cd2dd2f39983e7c4b4267666e6960f8f93bf493bab25711e6cbc0b7ab3b41fe134ffb944c6e973b2e19c151a4551ffe669aa66135d708eaf738a73c42abc6b
7
+ data.tar.gz: bf31bc039ef3250071b784046b5cb6619797692553015f9b96da51b3bb2b08f03b6f676a7634326ba28b79e98c9aa105a3325e39008064adb79afd09f7ca08da
@@ -4,7 +4,7 @@ services:
4
4
  - docker
5
5
  env:
6
6
  global:
7
- - TINYTDS_VERSION=2.1.0.pre4
7
+ - TINYTDS_VERSION=2.1.0
8
8
  - ACTIVERECORD_UNITTEST_HOST=localhost
9
9
  - ACTIVERECORD_UNITTEST_DATASERVER=localhost
10
10
  rvm:
@@ -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.2
1
+ 5.1.5
@@ -2,7 +2,7 @@ init:
2
2
  - SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
3
3
  - SET PATH=C:\MinGW\msys\1.0\bin;%PATH%
4
4
  - SET RAKEOPT=-rdevkit
5
- - SET TINYTDS_VERSION=2.1.0.pre4
5
+ - SET TINYTDS_VERSION=2.1.0
6
6
  clone_depth: 5
7
7
  skip_tags: true
8
8
  matrix:
data/circle.yml CHANGED
@@ -6,7 +6,7 @@ general:
6
6
  machine:
7
7
  environment:
8
8
  PATH: /opt/local/bin:${PATH}
9
- TINYTDS_VERSION: 2.1.0.pre4
9
+ TINYTDS_VERSION: 2.1.0
10
10
  ACTIVERECORD_UNITTEST_HOST: localhost
11
11
  ACTIVERECORD_UNITTEST_DATASERVER: localhost
12
12
  services:
@@ -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
- vstring = _raw_select('SELECT @@version', fetch: :rows).first.first.to_s
439
- return 2016 if vstring =~ /vNext/
440
- /SQL Server (\d+)/.match(vstring).to_a.last.to_s.to_i
441
- rescue Exception => e
442
- 2016
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
@@ -3,7 +3,7 @@
3
3
  set -x
4
4
  set -e
5
5
 
6
- tag=2.0
6
+ tag=2017-GA
7
7
 
8
8
  docker pull metaskills/mssql-server-linux-rails:$tag
9
9
 
@@ -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 : nil %>
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 : nil %>
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.2
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-10-02 00:00:00.000000000 Z
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
@@ -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`.