activerecord-sqlserver-adapter 7.1.8 → 7.1.9

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: dac0412f21213482d15ff47e53332fe825939a1c4e1d9526884b2a4c91a93d7d
4
- data.tar.gz: c86cf7d138d27def9534f715c421b029370649343985b4e9d5d16e1c9953ae03
3
+ metadata.gz: 8c9a920a4f60419f9224af3015631bceb30eea4b70356e947f26f9c05feaff3a
4
+ data.tar.gz: '08182d688ca9aa20b42f4a42e29580335665f751d873fc1443d71e3d03a550bd'
5
5
  SHA512:
6
- metadata.gz: b2ef1d7310bea2d0e1bf6feb84a4dd9124898cb80ec83b9f4c30e7f94ce9e4a3220f57285a5f3d71a2dc48706a906edb17a39ad099367b871d52fe5783dc6225
7
- data.tar.gz: f510e15d47aaadd47a5ceeb2b89d0becbc91758ef4b4383caaef940a8ad29a462cd737a0f967186c7cafbc5c57d2277c46b8c0332f32e43c64461957b147cb3e
6
+ metadata.gz: 2f72132748467ea80ed8f364f32522cb0b59a678b2895875d485473328f017d34c39cf8d60fc916ee0fa1d1c0344f078d0ff30ec67caff38e978961d2eaf9c2c
7
+ data.tar.gz: cca704ba3fbda50765708251a1d2c3f081e0d2258505eac05d759bbe7455e4b81692e80d94a7f02e45c29d497624e3d285d41883e893a8af3451be18c4d99618
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## v7.1.9
2
+
3
+ #### Fixed
4
+
5
+ - [#1245](https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/1245) Allow INSERT statements with SELECT notation
6
+
1
7
  ## v7.1.8
2
8
 
3
9
  #### Fixed
data/VERSION CHANGED
@@ -1 +1 @@
1
- 7.1.8
1
+ 7.1.9
@@ -681,6 +681,7 @@ module ActiveRecord
681
681
  s.split(/INSERT INTO/i)[1]
682
682
  .split(/OUTPUT INSERTED/i)[0]
683
683
  .split(/(DEFAULT)?\s+VALUES/i)[0]
684
+ .split(/\bSELECT\b(?![^\[]*\])/i)[0]
684
685
  .match(/\s*([^(]*)/i)[0]
685
686
  elsif s.match?(/^\s*UPDATE\s+.*/i)
686
687
  s.match(/UPDATE\s+([^\(\s]+)\s*/i)[1]
@@ -96,6 +96,10 @@ class SchemaTestSQLServer < ActiveRecord::TestCase
96
96
  it do
97
97
  assert_equal "[test].[aliens]", connection.send(:get_raw_table_name, "EXEC sp_executesql N'INSERT INTO [test].[aliens] ([name]) OUTPUT INSERTED.[id] VALUES (@0)', N'@0 varchar(255)', @0 = 'Trisolarans'")
98
98
  end
99
+
100
+ it do
101
+ assert_equal "[with].[select notation]", connection.send(:get_raw_table_name, "INSERT INTO [with].[select notation] SELECT * FROM [table_name]")
102
+ end
99
103
  end
100
104
  end
101
105
  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: 7.1.8
4
+ version: 7.1.9
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-10-02 00:00:00.000000000 Z
18
+ date: 2024-11-10 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: activerecord
@@ -240,8 +240,8 @@ licenses:
240
240
  - MIT
241
241
  metadata:
242
242
  bug_tracker_uri: https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/issues
243
- changelog_uri: https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/blob/v7.1.8/CHANGELOG.md
244
- source_code_uri: https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/tree/v7.1.8
243
+ changelog_uri: https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/blob/v7.1.9/CHANGELOG.md
244
+ source_code_uri: https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/tree/v7.1.9
245
245
  post_install_message:
246
246
  rdoc_options: []
247
247
  require_paths:
@@ -257,7 +257,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
257
257
  - !ruby/object:Gem::Version
258
258
  version: '0'
259
259
  requirements: []
260
- rubygems_version: 3.5.17
260
+ rubygems_version: 3.5.21
261
261
  signing_key:
262
262
  specification_version: 4
263
263
  summary: ActiveRecord SQL Server Adapter.