activerecord-sqlserver-adapter 8.0.1 → 8.0.2

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
  SHA256:
3
- metadata.gz: c99a1de9708c420caf70ef674f8030ad285cd514110ddac415855918dba0312d
4
- data.tar.gz: 54a9fd23dc6c22d61f8c7bedbc369ac727b198068e1c33a5937c6440d426c649
3
+ metadata.gz: cebd5142b6e4cd7fc42be58fc02ba1be8cef17425812d28991643dec2a079743
4
+ data.tar.gz: dcf926a50cc90a36bb6d41b6adae4eabae84b92d3d4844c6661a9c0d60efd478
5
5
  SHA512:
6
- metadata.gz: 1c8dc920900865712ca82fa73de5294f5016aa381d5a2c56e2d920d5c2127904576408eaaf3dda6f5a190c4eceb1fb23a3266ed59560703146ca9217e1e0abbf
7
- data.tar.gz: 266b7a4e3cf8e44fdc9302dac49bc4a53647fe6555769d130ff180b89c50c89e702aa7c6fba7ccc362bf287b6231a63ad5cc16832b19150ec16b1438065fe86c
6
+ metadata.gz: e4158590963a45ac2bd13ae2a8200554693a0ea9a5a2fd68ff17ec07ed25d8c03dd11efcbdb28b6dc0d56c7bd88df77e57c11a87ee375096077da78647ce80c0
7
+ data.tar.gz: 42a84013b9b6949f04d4eb99aa01b6727d2556dc2764b57454661f680eb4fe62541ce8fc05c74c7f7154c271601caf004fd864482d19115b1fc9cac152a4774a
@@ -1,12 +1,6 @@
1
1
  name: CI
2
2
 
3
- on:
4
- push:
5
- branches: [ main ]
6
- pull_request:
7
- branches: [ main ]
8
- schedule:
9
- - cron: '0 4 * * 1'
3
+ on: [push, pull_request]
10
4
 
11
5
  jobs:
12
6
  test:
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## v8.0.2
2
+
3
+ #### Fixed
4
+
5
+ - [#1272](https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/1272) Fix parsing of raw table name from SQL with extra parentheses
6
+
1
7
  ## v8.0.1
2
8
 
3
9
  #### Fixed
data/VERSION CHANGED
@@ -1 +1 @@
1
- 8.0.1
1
+ 8.0.2
@@ -711,7 +711,7 @@ module ActiveRecord
711
711
  elsif s.match?(/^\s*UPDATE\s+.*/i)
712
712
  s.match(/UPDATE\s+([^\(\s]+)\s*/i)[1]
713
713
  else
714
- s.match(/FROM\s+((\[[^\(\]]+\])|[^\(\s]+)\s*/i)[1]
714
+ s.match(/FROM[\s|\(]+((\[[^\(\]]+\])|[^\(\s]+)\s*/i)[1]
715
715
  end.strip
716
716
  end
717
717
 
@@ -3,6 +3,7 @@
3
3
  require "tiny_tds"
4
4
  require "base64"
5
5
  require "active_record"
6
+ require "active_record/connection_adapters/statement_pool"
6
7
  require "arel_sqlserver"
7
8
  require "active_record/connection_adapters/sqlserver/core_ext/active_record"
8
9
  require "active_record/connection_adapters/sqlserver/core_ext/explain"
@@ -1183,6 +1183,9 @@ module ActiveRecord
1183
1183
  end
1184
1184
  end
1185
1185
 
1186
+ # SQL Server does not support 'restrict' for 'on_update' or 'on_delete'.
1187
+ coerce_tests! :test_remove_foreign_key_with_restrict_action
1188
+
1186
1189
  # Error message depends on the database adapter.
1187
1190
  coerce_tests! :test_add_foreign_key_with_if_not_exists_not_set
1188
1191
  def test_add_foreign_key_with_if_not_exists_not_set_coerced
@@ -101,5 +101,11 @@ class SchemaTestSQLServer < ActiveRecord::TestCase
101
101
  assert_equal "[with].[select notation]", connection.send(:get_raw_table_name, "INSERT INTO [with].[select notation] SELECT * FROM [table_name]")
102
102
  end
103
103
  end
104
+
105
+ describe 'CREATE VIEW statements' do
106
+ it do
107
+ assert_equal "test_table_as", connection.send(:get_raw_table_name, "CREATE VIEW test_views ( test_table_a_id, test_table_b_id ) AS SELECT test_table_as.id as test_table_a_id, test_table_bs.id as test_table_b_id FROM (test_table_as with(nolock) LEFT JOIN test_table_bs with(nolock) ON (test_table_as.id = test_table_bs.test_table_a_id))")
108
+ end
109
+ end
104
110
  end
105
111
  end
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: 8.0.1
4
+ version: 8.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ken Collins
@@ -15,7 +15,7 @@ authors:
15
15
  autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
- date: 2024-12-08 00:00:00.000000000 Z
18
+ date: 2025-01-08 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: activerecord
@@ -238,8 +238,8 @@ licenses:
238
238
  - MIT
239
239
  metadata:
240
240
  bug_tracker_uri: https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/issues
241
- changelog_uri: https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/blob/v8.0.1/CHANGELOG.md
242
- source_code_uri: https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/tree/v8.0.1
241
+ changelog_uri: https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/blob/v8.0.2/CHANGELOG.md
242
+ source_code_uri: https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/tree/v8.0.2
243
243
  post_install_message:
244
244
  rdoc_options: []
245
245
  require_paths: