tiny_tds 2.1.7-x64-mingw-ucrt → 3.1.0-x64-mingw-ucrt

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.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +477 -0
  3. data/CHANGELOG.md +14 -0
  4. data/ISSUE_TEMPLATE.md +1 -1
  5. data/README.md +25 -45
  6. data/Rakefile +2 -6
  7. data/VERSION +1 -1
  8. data/docker-compose.yml +2 -2
  9. data/ext/tiny_tds/client.c +8 -15
  10. data/ext/tiny_tds/extconf.rb +1 -2
  11. data/ext/tiny_tds/extconsts.rb +4 -10
  12. data/ext/tiny_tds/result.c +27 -35
  13. data/ext/tiny_tds/tiny_tds_ext.c +4 -1
  14. data/lib/tiny_tds/3.1/tiny_tds.so +0 -0
  15. data/lib/tiny_tds/3.2/tiny_tds.so +0 -0
  16. data/lib/tiny_tds/3.3/tiny_tds.so +0 -0
  17. data/lib/tiny_tds/3.4/tiny_tds.so +0 -0
  18. data/ports/x64-mingw-ucrt/freetds/{1.1.24 → 1.4.23}/bin/bsqldb.exe +0 -0
  19. data/ports/x64-mingw-ucrt/freetds/{1.1.24 → 1.4.23}/bin/datacopy.exe +0 -0
  20. data/ports/x64-mingw-ucrt/freetds/{1.1.24 → 1.4.23}/bin/defncopy.exe +0 -0
  21. data/ports/x64-mingw-ucrt/freetds/{1.1.24 → 1.4.23}/bin/freebcp.exe +0 -0
  22. data/ports/x64-mingw-ucrt/freetds/1.4.23/bin/libct-4.dll +0 -0
  23. data/ports/x64-mingw-ucrt/freetds/1.4.23/bin/libsybdb-5.dll +0 -0
  24. data/ports/x64-mingw-ucrt/freetds/{1.1.24 → 1.4.23}/bin/osql +84 -79
  25. data/ports/x64-mingw-ucrt/freetds/1.4.23/bin/tdspool.exe +0 -0
  26. data/ports/x64-mingw-ucrt/freetds/1.4.23/bin/tsql.exe +0 -0
  27. data/ports/x64-mingw-ucrt/freetds/{1.1.24 → 1.4.23}/lib/libct.la +3 -3
  28. data/ports/x64-mingw-ucrt/freetds/{1.1.24 → 1.4.23}/lib/libsybdb.la +3 -3
  29. data/ports/x64-mingw-ucrt/libiconv/{1.15 → 1.17}/bin/iconv.exe +0 -0
  30. data/ports/x64-mingw-ucrt/libiconv/{1.15 → 1.17}/bin/libcharset-1.dll +0 -0
  31. data/ports/x64-mingw-ucrt/libiconv/{1.15 → 1.17}/bin/libiconv-2.dll +0 -0
  32. data/ports/x64-mingw-ucrt/libiconv/{1.15 → 1.17}/lib/libcharset.dll.a +0 -0
  33. data/ports/x64-mingw-ucrt/libiconv/{1.15 → 1.17}/lib/libcharset.la +3 -3
  34. data/ports/x64-mingw-ucrt/libiconv/{1.15 → 1.17}/lib/libiconv.dll.a +0 -0
  35. data/ports/x64-mingw-ucrt/libiconv/{1.15 → 1.17}/lib/libiconv.la +4 -4
  36. data/ports/x64-mingw-ucrt/openssl/{1.1.1s → 3.4.0}/bin/c_rehash +46 -45
  37. data/ports/x64-mingw-ucrt/openssl/3.4.0/bin/libcrypto-3-x64.dll +0 -0
  38. data/ports/x64-mingw-ucrt/openssl/3.4.0/bin/libssl-3-x64.dll +0 -0
  39. data/ports/x64-mingw-ucrt/openssl/3.4.0/bin/openssl.exe +0 -0
  40. data/tasks/ports/freetds.rb +1 -6
  41. data/tasks/ports.rake +2 -2
  42. data/test/bin/install-mssql.ps1 +22 -11
  43. data/test/client_test.rb +2 -5
  44. data/test/gem_test.rb +1 -2
  45. data/test/result_test.rb +99 -192
  46. data/test/schema_test.rb +366 -388
  47. data/test/test_helper.rb +7 -38
  48. data/tiny_tds.gemspec +5 -4
  49. metadata +51 -46
  50. data/.circleci/config.yml +0 -409
  51. data/ports/x64-mingw-ucrt/freetds/1.1.24/bin/libct-4.dll +0 -0
  52. data/ports/x64-mingw-ucrt/freetds/1.1.24/bin/libsybdb-5.dll +0 -0
  53. data/ports/x64-mingw-ucrt/freetds/1.1.24/bin/tdspool.exe +0 -0
  54. data/ports/x64-mingw-ucrt/freetds/1.1.24/bin/tsql.exe +0 -0
  55. data/ports/x64-mingw-ucrt/libiconv/1.15/lib/charset.alias +0 -4
  56. data/ports/x64-mingw-ucrt/openssl/1.1.1s/bin/libcrypto-1_1-x64.dll +0 -0
  57. data/ports/x64-mingw-ucrt/openssl/1.1.1s/bin/libssl-1_1-x64.dll +0 -0
  58. data/ports/x64-mingw-ucrt/openssl/1.1.1s/bin/openssl.exe +0 -0
  59. data/ports/x64-mingw-ucrt/openssl/1.1.1s/lib/libcrypto.a +0 -0
  60. data/ports/x64-mingw-ucrt/openssl/1.1.1s/lib/libcrypto.dll.a +0 -0
  61. data/ports/x64-mingw-ucrt/openssl/1.1.1s/lib/libssl.a +0 -0
  62. data/ports/x64-mingw-ucrt/openssl/1.1.1s/lib/libssl.dll.a +0 -0
  63. data/test/schema/sqlserver_2000.sql +0 -140
  64. data/test/schema/sqlserver_2005.sql +0 -140
  65. data/test/schema/sqlserver_2014.sql +0 -140
  66. data/test/schema/sqlserver_2016.sql +0 -140
  67. data/test/schema/sybase_ase.sql +0 -138
  68. /data/ports/x64-mingw-ucrt/freetds/{1.1.24 → 1.4.23}/lib/libct.dll.a +0 -0
  69. /data/ports/x64-mingw-ucrt/freetds/{1.1.24 → 1.4.23}/lib/libsybdb.dll.a +0 -0
  70. /data/test/schema/{sqlserver_2008.sql → sqlserver_2017.sql} +0 -0
data/test/test_helper.rb CHANGED
@@ -4,15 +4,18 @@ require 'tiny_tds'
4
4
  require 'minitest/autorun'
5
5
  require 'toxiproxy'
6
6
 
7
- TINYTDS_SCHEMAS = ['sqlserver_2000', 'sqlserver_2005', 'sqlserver_2008', 'sqlserver_2014', 'sqlserver_azure', 'sybase_ase'].freeze
7
+ require "minitest/reporters"
8
+ Minitest::Reporters.use! [Minitest::Reporters::SpecReporter.new, Minitest::Reporters::JUnitReporter.new]
9
+
10
+ TINYTDS_SCHEMAS = ['sqlserver_2017', 'sqlserver_azure'].freeze
8
11
 
9
12
  module TinyTds
10
- class TestCase < MiniTest::Spec
13
+ class TestCase < Minitest::Spec
11
14
 
12
15
  class << self
13
16
 
14
17
  def current_schema
15
- ENV['TINYTDS_SCHEMA'] || 'sqlserver_2014'
18
+ ENV['TINYTDS_SCHEMA'] || 'sqlserver_2017'
16
19
  end
17
20
 
18
21
  TINYTDS_SCHEMAS.each do |schema|
@@ -20,11 +23,6 @@ module TinyTds
20
23
  schema == self.current_schema
21
24
  end
22
25
  end
23
-
24
- def sqlserver?
25
- current_schema =~ /sqlserver/
26
- end
27
-
28
26
  end
29
27
 
30
28
  after { close_client }
@@ -41,20 +39,13 @@ module TinyTds
41
39
  self.class.current_schema
42
40
  end
43
41
 
44
- def sqlserver?
45
- self.class.sqlserver?
46
- end
47
-
48
42
  def close_client(client=@client)
49
43
  client.close if defined?(client) && client.is_a?(TinyTds::Client)
50
44
  end
51
45
 
52
46
  def new_connection(options={})
53
47
  client = TinyTds::Client.new(connection_options(options))
54
- if sybase_ase?
55
- client.execute("SET ANSINULL ON").do
56
- return client
57
- elsif sqlserver_azure?
48
+ if sqlserver_azure?
58
49
  client.execute('SET ANSI_NULLS ON').do
59
50
  client.execute('SET CURSOR_CLOSE_ON_COMMIT OFF').do
60
51
  client.execute('SET ANSI_NULL_DFLT_ON ON').do
@@ -161,28 +152,6 @@ module TinyTds
161
152
  end
162
153
 
163
154
  def drop_sql
164
- sybase_ase? ? drop_sql_sybase : drop_sql_microsoft
165
- end
166
-
167
- def drop_sql_sybase
168
- %|IF EXISTS(
169
- SELECT 1 FROM sysobjects WHERE type = 'U' AND name = 'datatypes'
170
- ) DROP TABLE datatypes
171
- IF EXISTS(
172
- SELECT 1 FROM sysobjects WHERE type = 'P' AND name = 'tinytds_TestReturnCodes'
173
- ) DROP PROCEDURE tinytds_TestReturnCodes
174
- IF EXISTS(
175
- SELECT 1 FROM sysobjects WHERE type = 'P' AND name = 'tinytds_TestPrintWithError'
176
- ) DROP PROCEDURE tinytds_TestPrintWithError
177
- IF EXISTS(
178
- SELECT 1 FROM sysobjects WHERE type = 'P' AND name = 'tinytds_TestPrintWithError'
179
- ) DROP PROCEDURE tinytds_TestPrintWithError
180
- IF EXISTS(
181
- SELECT 1 FROM sysobjects WHERE type = 'P' AND name = 'tinytds_TestSeveralPrints'
182
- ) DROP PROCEDURE tinytds_TestSeveralPrints|
183
- end
184
-
185
- def drop_sql_microsoft
186
155
  %|IF EXISTS (
187
156
  SELECT TABLE_NAME
188
157
  FROM INFORMATION_SCHEMA.TABLES
data/tiny_tds.gemspec CHANGED
@@ -18,14 +18,15 @@ Gem::Specification.new do |s|
18
18
  s.rdoc_options = ['--charset=UTF-8']
19
19
  s.extensions = ['ext/tiny_tds/extconf.rb']
20
20
  s.license = 'MIT'
21
- s.required_ruby_version = '>= 2.0.0'
21
+ s.required_ruby_version = '>= 2.7.0'
22
22
  s.metadata['msys2_mingw_dependencies'] = 'freetds'
23
+ s.add_dependency 'bigdecimal', '~> 3'
23
24
  s.add_development_dependency 'mini_portile2', '~> 2.5.0'
24
25
  s.add_development_dependency 'rake', '~> 13.0.0'
25
26
  s.add_development_dependency 'rake-compiler', '~> 1.2'
26
- s.add_development_dependency 'rake-compiler-dock', '~> 1.4.0'
27
- s.add_development_dependency 'minitest', '~> 5.14.0'
28
- s.add_development_dependency 'minitest-ci', '~> 3.4.0'
27
+ s.add_development_dependency 'rake-compiler-dock', '~> 1.7.0'
28
+ s.add_development_dependency 'minitest', '~> 5.25'
29
+ s.add_development_dependency 'minitest-reporters', '~> 1.6.1'
29
30
  s.add_development_dependency 'connection_pool', '~> 2.2.0'
30
31
  s.add_development_dependency 'toxiproxy', '~> 2.0.0'
31
32
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tiny_tds
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.7
4
+ version: 3.1.0
5
5
  platform: x64-mingw-ucrt
6
6
  authors:
7
7
  - Ken Collins
@@ -10,8 +10,22 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2024-01-08 00:00:00.000000000 Z
13
+ date: 2025-01-02 00:00:00.000000000 Z
14
14
  dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: bigdecimal
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - "~>"
20
+ - !ruby/object:Gem::Version
21
+ version: '3'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - "~>"
27
+ - !ruby/object:Gem::Version
28
+ version: '3'
15
29
  - !ruby/object:Gem::Dependency
16
30
  name: mini_portile2
17
31
  requirement: !ruby/object:Gem::Requirement
@@ -60,42 +74,42 @@ dependencies:
60
74
  requirements:
61
75
  - - "~>"
62
76
  - !ruby/object:Gem::Version
63
- version: 1.4.0
77
+ version: 1.7.0
64
78
  type: :development
65
79
  prerelease: false
66
80
  version_requirements: !ruby/object:Gem::Requirement
67
81
  requirements:
68
82
  - - "~>"
69
83
  - !ruby/object:Gem::Version
70
- version: 1.4.0
84
+ version: 1.7.0
71
85
  - !ruby/object:Gem::Dependency
72
86
  name: minitest
73
87
  requirement: !ruby/object:Gem::Requirement
74
88
  requirements:
75
89
  - - "~>"
76
90
  - !ruby/object:Gem::Version
77
- version: 5.14.0
91
+ version: '5.25'
78
92
  type: :development
79
93
  prerelease: false
80
94
  version_requirements: !ruby/object:Gem::Requirement
81
95
  requirements:
82
96
  - - "~>"
83
97
  - !ruby/object:Gem::Version
84
- version: 5.14.0
98
+ version: '5.25'
85
99
  - !ruby/object:Gem::Dependency
86
- name: minitest-ci
100
+ name: minitest-reporters
87
101
  requirement: !ruby/object:Gem::Requirement
88
102
  requirements:
89
103
  - - "~>"
90
104
  - !ruby/object:Gem::Version
91
- version: 3.4.0
105
+ version: 1.6.1
92
106
  type: :development
93
107
  prerelease: false
94
108
  version_requirements: !ruby/object:Gem::Requirement
95
109
  requirements:
96
110
  - - "~>"
97
111
  - !ruby/object:Gem::Version
98
- version: 3.4.0
112
+ version: 1.6.1
99
113
  - !ruby/object:Gem::Dependency
100
114
  name: connection_pool
101
115
  requirement: !ruby/object:Gem::Requirement
@@ -135,9 +149,9 @@ executables:
135
149
  extensions: []
136
150
  extra_rdoc_files: []
137
151
  files:
138
- - ".circleci/config.yml"
139
152
  - ".codeclimate.yml"
140
153
  - ".gitattributes"
154
+ - ".github/workflows/ci.yml"
141
155
  - ".gitignore"
142
156
  - ".rubocop.yml"
143
157
  - CHANGELOG.md
@@ -164,6 +178,7 @@ files:
164
178
  - lib/tiny_tds/3.1/tiny_tds.so
165
179
  - lib/tiny_tds/3.2/tiny_tds.so
166
180
  - lib/tiny_tds/3.3/tiny_tds.so
181
+ - lib/tiny_tds/3.4/tiny_tds.so
167
182
  - lib/tiny_tds/bin.rb
168
183
  - lib/tiny_tds/client.rb
169
184
  - lib/tiny_tds/error.rb
@@ -173,35 +188,30 @@ files:
173
188
  - patches/freetds/1.00.27/0001-mingw_missing_inet_pton.diff
174
189
  - patches/freetds/1.00.27/0002-Don-t-use-MSYS2-file-libws2_32.diff
175
190
  - patches/libiconv/1.14/1-avoid-gets-error.patch
176
- - ports/x64-mingw-ucrt/freetds/1.1.24/bin/bsqldb.exe
177
- - ports/x64-mingw-ucrt/freetds/1.1.24/bin/datacopy.exe
178
- - ports/x64-mingw-ucrt/freetds/1.1.24/bin/defncopy.exe
179
- - ports/x64-mingw-ucrt/freetds/1.1.24/bin/freebcp.exe
180
- - ports/x64-mingw-ucrt/freetds/1.1.24/bin/libct-4.dll
181
- - ports/x64-mingw-ucrt/freetds/1.1.24/bin/libsybdb-5.dll
182
- - ports/x64-mingw-ucrt/freetds/1.1.24/bin/osql
183
- - ports/x64-mingw-ucrt/freetds/1.1.24/bin/tdspool.exe
184
- - ports/x64-mingw-ucrt/freetds/1.1.24/bin/tsql.exe
185
- - ports/x64-mingw-ucrt/freetds/1.1.24/lib/libct.dll.a
186
- - ports/x64-mingw-ucrt/freetds/1.1.24/lib/libct.la
187
- - ports/x64-mingw-ucrt/freetds/1.1.24/lib/libsybdb.dll.a
188
- - ports/x64-mingw-ucrt/freetds/1.1.24/lib/libsybdb.la
189
- - ports/x64-mingw-ucrt/libiconv/1.15/bin/iconv.exe
190
- - ports/x64-mingw-ucrt/libiconv/1.15/bin/libcharset-1.dll
191
- - ports/x64-mingw-ucrt/libiconv/1.15/bin/libiconv-2.dll
192
- - ports/x64-mingw-ucrt/libiconv/1.15/lib/charset.alias
193
- - ports/x64-mingw-ucrt/libiconv/1.15/lib/libcharset.dll.a
194
- - ports/x64-mingw-ucrt/libiconv/1.15/lib/libcharset.la
195
- - ports/x64-mingw-ucrt/libiconv/1.15/lib/libiconv.dll.a
196
- - ports/x64-mingw-ucrt/libiconv/1.15/lib/libiconv.la
197
- - ports/x64-mingw-ucrt/openssl/1.1.1s/bin/c_rehash
198
- - ports/x64-mingw-ucrt/openssl/1.1.1s/bin/libcrypto-1_1-x64.dll
199
- - ports/x64-mingw-ucrt/openssl/1.1.1s/bin/libssl-1_1-x64.dll
200
- - ports/x64-mingw-ucrt/openssl/1.1.1s/bin/openssl.exe
201
- - ports/x64-mingw-ucrt/openssl/1.1.1s/lib/libcrypto.a
202
- - ports/x64-mingw-ucrt/openssl/1.1.1s/lib/libcrypto.dll.a
203
- - ports/x64-mingw-ucrt/openssl/1.1.1s/lib/libssl.a
204
- - ports/x64-mingw-ucrt/openssl/1.1.1s/lib/libssl.dll.a
191
+ - ports/x64-mingw-ucrt/freetds/1.4.23/bin/bsqldb.exe
192
+ - ports/x64-mingw-ucrt/freetds/1.4.23/bin/datacopy.exe
193
+ - ports/x64-mingw-ucrt/freetds/1.4.23/bin/defncopy.exe
194
+ - ports/x64-mingw-ucrt/freetds/1.4.23/bin/freebcp.exe
195
+ - ports/x64-mingw-ucrt/freetds/1.4.23/bin/libct-4.dll
196
+ - ports/x64-mingw-ucrt/freetds/1.4.23/bin/libsybdb-5.dll
197
+ - ports/x64-mingw-ucrt/freetds/1.4.23/bin/osql
198
+ - ports/x64-mingw-ucrt/freetds/1.4.23/bin/tdspool.exe
199
+ - ports/x64-mingw-ucrt/freetds/1.4.23/bin/tsql.exe
200
+ - ports/x64-mingw-ucrt/freetds/1.4.23/lib/libct.dll.a
201
+ - ports/x64-mingw-ucrt/freetds/1.4.23/lib/libct.la
202
+ - ports/x64-mingw-ucrt/freetds/1.4.23/lib/libsybdb.dll.a
203
+ - ports/x64-mingw-ucrt/freetds/1.4.23/lib/libsybdb.la
204
+ - ports/x64-mingw-ucrt/libiconv/1.17/bin/iconv.exe
205
+ - ports/x64-mingw-ucrt/libiconv/1.17/bin/libcharset-1.dll
206
+ - ports/x64-mingw-ucrt/libiconv/1.17/bin/libiconv-2.dll
207
+ - ports/x64-mingw-ucrt/libiconv/1.17/lib/libcharset.dll.a
208
+ - ports/x64-mingw-ucrt/libiconv/1.17/lib/libcharset.la
209
+ - ports/x64-mingw-ucrt/libiconv/1.17/lib/libiconv.dll.a
210
+ - ports/x64-mingw-ucrt/libiconv/1.17/lib/libiconv.la
211
+ - ports/x64-mingw-ucrt/openssl/3.4.0/bin/c_rehash
212
+ - ports/x64-mingw-ucrt/openssl/3.4.0/bin/libcrypto-3-x64.dll
213
+ - ports/x64-mingw-ucrt/openssl/3.4.0/bin/libssl-3-x64.dll
214
+ - ports/x64-mingw-ucrt/openssl/3.4.0/bin/openssl.exe
205
215
  - setup_cimgruby_dev.sh
206
216
  - start_dev.sh
207
217
  - tasks/native_gem.rake
@@ -225,13 +235,8 @@ files:
225
235
  - test/gem_test.rb
226
236
  - test/result_test.rb
227
237
  - test/schema/1px.gif
228
- - test/schema/sqlserver_2000.sql
229
- - test/schema/sqlserver_2005.sql
230
- - test/schema/sqlserver_2008.sql
231
- - test/schema/sqlserver_2014.sql
232
- - test/schema/sqlserver_2016.sql
238
+ - test/schema/sqlserver_2017.sql
233
239
  - test/schema/sqlserver_azure.sql
234
- - test/schema/sybase_ase.sql
235
240
  - test/schema_test.rb
236
241
  - test/sql/db-create.sql
237
242
  - test/sql/db-login.sql
@@ -254,7 +259,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
254
259
  version: '3.1'
255
260
  - - "<"
256
261
  - !ruby/object:Gem::Version
257
- version: 3.4.dev
262
+ version: 3.5.dev
258
263
  required_rubygems_version: !ruby/object:Gem::Requirement
259
264
  requirements:
260
265
  - - ">="