tiny_tds 2.1.7-x64-mingw32 → 3.1.0-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) 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/2.7/tiny_tds.so +0 -0
  15. data/lib/tiny_tds/3.0/tiny_tds.so +0 -0
  16. data/ports/x64-mingw32/freetds/{1.1.24 → 1.4.23}/bin/bsqldb.exe +0 -0
  17. data/ports/x64-mingw32/freetds/{1.1.24 → 1.4.23}/bin/datacopy.exe +0 -0
  18. data/ports/x64-mingw32/freetds/{1.1.24 → 1.4.23}/bin/defncopy.exe +0 -0
  19. data/ports/x64-mingw32/freetds/{1.1.24 → 1.4.23}/bin/freebcp.exe +0 -0
  20. data/ports/x64-mingw32/freetds/1.4.23/bin/libct-4.dll +0 -0
  21. data/ports/x64-mingw32/freetds/1.4.23/bin/libsybdb-5.dll +0 -0
  22. data/ports/x64-mingw32/freetds/{1.1.24 → 1.4.23}/bin/osql +84 -79
  23. data/ports/x64-mingw32/freetds/1.4.23/bin/tdspool.exe +0 -0
  24. data/ports/x64-mingw32/freetds/1.4.23/bin/tsql.exe +0 -0
  25. data/ports/x64-mingw32/freetds/{1.1.24 → 1.4.23}/lib/libct.la +3 -3
  26. data/ports/x64-mingw32/freetds/{1.1.24 → 1.4.23}/lib/libsybdb.la +3 -3
  27. data/ports/x64-mingw32/libiconv/{1.15 → 1.17}/bin/iconv.exe +0 -0
  28. data/ports/x64-mingw32/libiconv/{1.15 → 1.17}/bin/libcharset-1.dll +0 -0
  29. data/ports/x64-mingw32/libiconv/{1.15 → 1.17}/bin/libiconv-2.dll +0 -0
  30. data/ports/x64-mingw32/libiconv/{1.15 → 1.17}/lib/libcharset.dll.a +0 -0
  31. data/ports/x64-mingw32/libiconv/{1.15 → 1.17}/lib/libcharset.la +3 -3
  32. data/ports/x64-mingw32/libiconv/{1.15 → 1.17}/lib/libiconv.dll.a +0 -0
  33. data/ports/x64-mingw32/libiconv/{1.15 → 1.17}/lib/libiconv.la +4 -4
  34. data/ports/x64-mingw32/openssl/{1.1.1s → 3.4.0}/bin/c_rehash +46 -45
  35. data/ports/x64-mingw32/openssl/3.4.0/bin/libcrypto-3-x64.dll +0 -0
  36. data/ports/x64-mingw32/openssl/3.4.0/bin/libssl-3-x64.dll +0 -0
  37. data/ports/x64-mingw32/openssl/3.4.0/bin/openssl.exe +0 -0
  38. data/tasks/ports/freetds.rb +1 -6
  39. data/tasks/ports.rake +2 -2
  40. data/test/bin/install-mssql.ps1 +22 -11
  41. data/test/client_test.rb +2 -5
  42. data/test/gem_test.rb +1 -2
  43. data/test/result_test.rb +99 -192
  44. data/test/schema_test.rb +366 -388
  45. data/test/test_helper.rb +7 -38
  46. data/tiny_tds.gemspec +5 -4
  47. metadata +50 -49
  48. data/.circleci/config.yml +0 -409
  49. data/lib/tiny_tds/2.4/tiny_tds.so +0 -0
  50. data/lib/tiny_tds/2.5/tiny_tds.so +0 -0
  51. data/lib/tiny_tds/2.6/tiny_tds.so +0 -0
  52. data/ports/x64-mingw32/freetds/1.1.24/bin/libct-4.dll +0 -0
  53. data/ports/x64-mingw32/freetds/1.1.24/bin/libsybdb-5.dll +0 -0
  54. data/ports/x64-mingw32/freetds/1.1.24/bin/tdspool.exe +0 -0
  55. data/ports/x64-mingw32/freetds/1.1.24/bin/tsql.exe +0 -0
  56. data/ports/x64-mingw32/libiconv/1.15/lib/charset.alias +0 -4
  57. data/ports/x64-mingw32/openssl/1.1.1s/bin/libcrypto-1_1-x64.dll +0 -0
  58. data/ports/x64-mingw32/openssl/1.1.1s/bin/libssl-1_1-x64.dll +0 -0
  59. data/ports/x64-mingw32/openssl/1.1.1s/bin/openssl.exe +0 -0
  60. data/ports/x64-mingw32/openssl/1.1.1s/lib/libcrypto.a +0 -0
  61. data/ports/x64-mingw32/openssl/1.1.1s/lib/libcrypto.dll.a +0 -0
  62. data/ports/x64-mingw32/openssl/1.1.1s/lib/libssl.a +0 -0
  63. data/ports/x64-mingw32/openssl/1.1.1s/lib/libssl.dll.a +0 -0
  64. data/test/schema/sqlserver_2000.sql +0 -140
  65. data/test/schema/sqlserver_2005.sql +0 -140
  66. data/test/schema/sqlserver_2014.sql +0 -140
  67. data/test/schema/sqlserver_2016.sql +0 -140
  68. data/test/schema/sybase_ase.sql +0 -138
  69. /data/ports/x64-mingw32/freetds/{1.1.24 → 1.4.23}/lib/libct.dll.a +0 -0
  70. /data/ports/x64-mingw32/freetds/{1.1.24 → 1.4.23}/lib/libsybdb.dll.a +0 -0
  71. /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-mingw32
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
@@ -161,9 +175,6 @@ files:
161
175
  - ext/tiny_tds/tiny_tds_ext.c
162
176
  - ext/tiny_tds/tiny_tds_ext.h
163
177
  - lib/tiny_tds.rb
164
- - lib/tiny_tds/2.4/tiny_tds.so
165
- - lib/tiny_tds/2.5/tiny_tds.so
166
- - lib/tiny_tds/2.6/tiny_tds.so
167
178
  - lib/tiny_tds/2.7/tiny_tds.so
168
179
  - lib/tiny_tds/3.0/tiny_tds.so
169
180
  - lib/tiny_tds/bin.rb
@@ -175,35 +186,30 @@ files:
175
186
  - patches/freetds/1.00.27/0001-mingw_missing_inet_pton.diff
176
187
  - patches/freetds/1.00.27/0002-Don-t-use-MSYS2-file-libws2_32.diff
177
188
  - patches/libiconv/1.14/1-avoid-gets-error.patch
178
- - ports/x64-mingw32/freetds/1.1.24/bin/bsqldb.exe
179
- - ports/x64-mingw32/freetds/1.1.24/bin/datacopy.exe
180
- - ports/x64-mingw32/freetds/1.1.24/bin/defncopy.exe
181
- - ports/x64-mingw32/freetds/1.1.24/bin/freebcp.exe
182
- - ports/x64-mingw32/freetds/1.1.24/bin/libct-4.dll
183
- - ports/x64-mingw32/freetds/1.1.24/bin/libsybdb-5.dll
184
- - ports/x64-mingw32/freetds/1.1.24/bin/osql
185
- - ports/x64-mingw32/freetds/1.1.24/bin/tdspool.exe
186
- - ports/x64-mingw32/freetds/1.1.24/bin/tsql.exe
187
- - ports/x64-mingw32/freetds/1.1.24/lib/libct.dll.a
188
- - ports/x64-mingw32/freetds/1.1.24/lib/libct.la
189
- - ports/x64-mingw32/freetds/1.1.24/lib/libsybdb.dll.a
190
- - ports/x64-mingw32/freetds/1.1.24/lib/libsybdb.la
191
- - ports/x64-mingw32/libiconv/1.15/bin/iconv.exe
192
- - ports/x64-mingw32/libiconv/1.15/bin/libcharset-1.dll
193
- - ports/x64-mingw32/libiconv/1.15/bin/libiconv-2.dll
194
- - ports/x64-mingw32/libiconv/1.15/lib/charset.alias
195
- - ports/x64-mingw32/libiconv/1.15/lib/libcharset.dll.a
196
- - ports/x64-mingw32/libiconv/1.15/lib/libcharset.la
197
- - ports/x64-mingw32/libiconv/1.15/lib/libiconv.dll.a
198
- - ports/x64-mingw32/libiconv/1.15/lib/libiconv.la
199
- - ports/x64-mingw32/openssl/1.1.1s/bin/c_rehash
200
- - ports/x64-mingw32/openssl/1.1.1s/bin/libcrypto-1_1-x64.dll
201
- - ports/x64-mingw32/openssl/1.1.1s/bin/libssl-1_1-x64.dll
202
- - ports/x64-mingw32/openssl/1.1.1s/bin/openssl.exe
203
- - ports/x64-mingw32/openssl/1.1.1s/lib/libcrypto.a
204
- - ports/x64-mingw32/openssl/1.1.1s/lib/libcrypto.dll.a
205
- - ports/x64-mingw32/openssl/1.1.1s/lib/libssl.a
206
- - ports/x64-mingw32/openssl/1.1.1s/lib/libssl.dll.a
189
+ - ports/x64-mingw32/freetds/1.4.23/bin/bsqldb.exe
190
+ - ports/x64-mingw32/freetds/1.4.23/bin/datacopy.exe
191
+ - ports/x64-mingw32/freetds/1.4.23/bin/defncopy.exe
192
+ - ports/x64-mingw32/freetds/1.4.23/bin/freebcp.exe
193
+ - ports/x64-mingw32/freetds/1.4.23/bin/libct-4.dll
194
+ - ports/x64-mingw32/freetds/1.4.23/bin/libsybdb-5.dll
195
+ - ports/x64-mingw32/freetds/1.4.23/bin/osql
196
+ - ports/x64-mingw32/freetds/1.4.23/bin/tdspool.exe
197
+ - ports/x64-mingw32/freetds/1.4.23/bin/tsql.exe
198
+ - ports/x64-mingw32/freetds/1.4.23/lib/libct.dll.a
199
+ - ports/x64-mingw32/freetds/1.4.23/lib/libct.la
200
+ - ports/x64-mingw32/freetds/1.4.23/lib/libsybdb.dll.a
201
+ - ports/x64-mingw32/freetds/1.4.23/lib/libsybdb.la
202
+ - ports/x64-mingw32/libiconv/1.17/bin/iconv.exe
203
+ - ports/x64-mingw32/libiconv/1.17/bin/libcharset-1.dll
204
+ - ports/x64-mingw32/libiconv/1.17/bin/libiconv-2.dll
205
+ - ports/x64-mingw32/libiconv/1.17/lib/libcharset.dll.a
206
+ - ports/x64-mingw32/libiconv/1.17/lib/libcharset.la
207
+ - ports/x64-mingw32/libiconv/1.17/lib/libiconv.dll.a
208
+ - ports/x64-mingw32/libiconv/1.17/lib/libiconv.la
209
+ - ports/x64-mingw32/openssl/3.4.0/bin/c_rehash
210
+ - ports/x64-mingw32/openssl/3.4.0/bin/libcrypto-3-x64.dll
211
+ - ports/x64-mingw32/openssl/3.4.0/bin/libssl-3-x64.dll
212
+ - ports/x64-mingw32/openssl/3.4.0/bin/openssl.exe
207
213
  - setup_cimgruby_dev.sh
208
214
  - start_dev.sh
209
215
  - tasks/native_gem.rake
@@ -227,13 +233,8 @@ files:
227
233
  - test/gem_test.rb
228
234
  - test/result_test.rb
229
235
  - test/schema/1px.gif
230
- - test/schema/sqlserver_2000.sql
231
- - test/schema/sqlserver_2005.sql
232
- - test/schema/sqlserver_2008.sql
233
- - test/schema/sqlserver_2014.sql
234
- - test/schema/sqlserver_2016.sql
236
+ - test/schema/sqlserver_2017.sql
235
237
  - test/schema/sqlserver_azure.sql
236
- - test/schema/sybase_ase.sql
237
238
  - test/schema_test.rb
238
239
  - test/sql/db-create.sql
239
240
  - test/sql/db-login.sql
@@ -253,7 +254,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
253
254
  requirements:
254
255
  - - ">="
255
256
  - !ruby/object:Gem::Version
256
- version: '2.4'
257
+ version: '2.7'
257
258
  - - "<"
258
259
  - !ruby/object:Gem::Version
259
260
  version: 3.1.dev