tiny_tds 2.1.7-x64-mingw-ucrt → 3.1.0-x64-mingw-ucrt
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +477 -0
- data/CHANGELOG.md +14 -0
- data/ISSUE_TEMPLATE.md +1 -1
- data/README.md +25 -45
- data/Rakefile +2 -6
- data/VERSION +1 -1
- data/docker-compose.yml +2 -2
- data/ext/tiny_tds/client.c +8 -15
- data/ext/tiny_tds/extconf.rb +1 -2
- data/ext/tiny_tds/extconsts.rb +4 -10
- data/ext/tiny_tds/result.c +27 -35
- data/ext/tiny_tds/tiny_tds_ext.c +4 -1
- data/lib/tiny_tds/3.1/tiny_tds.so +0 -0
- data/lib/tiny_tds/3.2/tiny_tds.so +0 -0
- data/lib/tiny_tds/3.3/tiny_tds.so +0 -0
- data/lib/tiny_tds/3.4/tiny_tds.so +0 -0
- data/ports/x64-mingw-ucrt/freetds/{1.1.24 → 1.4.23}/bin/bsqldb.exe +0 -0
- data/ports/x64-mingw-ucrt/freetds/{1.1.24 → 1.4.23}/bin/datacopy.exe +0 -0
- data/ports/x64-mingw-ucrt/freetds/{1.1.24 → 1.4.23}/bin/defncopy.exe +0 -0
- data/ports/x64-mingw-ucrt/freetds/{1.1.24 → 1.4.23}/bin/freebcp.exe +0 -0
- data/ports/x64-mingw-ucrt/freetds/1.4.23/bin/libct-4.dll +0 -0
- data/ports/x64-mingw-ucrt/freetds/1.4.23/bin/libsybdb-5.dll +0 -0
- data/ports/x64-mingw-ucrt/freetds/{1.1.24 → 1.4.23}/bin/osql +84 -79
- data/ports/x64-mingw-ucrt/freetds/1.4.23/bin/tdspool.exe +0 -0
- data/ports/x64-mingw-ucrt/freetds/1.4.23/bin/tsql.exe +0 -0
- data/ports/x64-mingw-ucrt/freetds/{1.1.24 → 1.4.23}/lib/libct.la +3 -3
- data/ports/x64-mingw-ucrt/freetds/{1.1.24 → 1.4.23}/lib/libsybdb.la +3 -3
- data/ports/x64-mingw-ucrt/libiconv/{1.15 → 1.17}/bin/iconv.exe +0 -0
- data/ports/x64-mingw-ucrt/libiconv/{1.15 → 1.17}/bin/libcharset-1.dll +0 -0
- data/ports/x64-mingw-ucrt/libiconv/{1.15 → 1.17}/bin/libiconv-2.dll +0 -0
- data/ports/x64-mingw-ucrt/libiconv/{1.15 → 1.17}/lib/libcharset.dll.a +0 -0
- data/ports/x64-mingw-ucrt/libiconv/{1.15 → 1.17}/lib/libcharset.la +3 -3
- data/ports/x64-mingw-ucrt/libiconv/{1.15 → 1.17}/lib/libiconv.dll.a +0 -0
- data/ports/x64-mingw-ucrt/libiconv/{1.15 → 1.17}/lib/libiconv.la +4 -4
- data/ports/x64-mingw-ucrt/openssl/{1.1.1s → 3.4.0}/bin/c_rehash +46 -45
- data/ports/x64-mingw-ucrt/openssl/3.4.0/bin/libcrypto-3-x64.dll +0 -0
- data/ports/x64-mingw-ucrt/openssl/3.4.0/bin/libssl-3-x64.dll +0 -0
- data/ports/x64-mingw-ucrt/openssl/3.4.0/bin/openssl.exe +0 -0
- data/tasks/ports/freetds.rb +1 -6
- data/tasks/ports.rake +2 -2
- data/test/bin/install-mssql.ps1 +22 -11
- data/test/client_test.rb +2 -5
- data/test/gem_test.rb +1 -2
- data/test/result_test.rb +99 -192
- data/test/schema_test.rb +366 -388
- data/test/test_helper.rb +7 -38
- data/tiny_tds.gemspec +5 -4
- metadata +51 -46
- data/.circleci/config.yml +0 -409
- data/ports/x64-mingw-ucrt/freetds/1.1.24/bin/libct-4.dll +0 -0
- data/ports/x64-mingw-ucrt/freetds/1.1.24/bin/libsybdb-5.dll +0 -0
- data/ports/x64-mingw-ucrt/freetds/1.1.24/bin/tdspool.exe +0 -0
- data/ports/x64-mingw-ucrt/freetds/1.1.24/bin/tsql.exe +0 -0
- data/ports/x64-mingw-ucrt/libiconv/1.15/lib/charset.alias +0 -4
- data/ports/x64-mingw-ucrt/openssl/1.1.1s/bin/libcrypto-1_1-x64.dll +0 -0
- data/ports/x64-mingw-ucrt/openssl/1.1.1s/bin/libssl-1_1-x64.dll +0 -0
- data/ports/x64-mingw-ucrt/openssl/1.1.1s/bin/openssl.exe +0 -0
- data/ports/x64-mingw-ucrt/openssl/1.1.1s/lib/libcrypto.a +0 -0
- data/ports/x64-mingw-ucrt/openssl/1.1.1s/lib/libcrypto.dll.a +0 -0
- data/ports/x64-mingw-ucrt/openssl/1.1.1s/lib/libssl.a +0 -0
- data/ports/x64-mingw-ucrt/openssl/1.1.1s/lib/libssl.dll.a +0 -0
- data/test/schema/sqlserver_2000.sql +0 -140
- data/test/schema/sqlserver_2005.sql +0 -140
- data/test/schema/sqlserver_2014.sql +0 -140
- data/test/schema/sqlserver_2016.sql +0 -140
- data/test/schema/sybase_ase.sql +0 -138
- /data/ports/x64-mingw-ucrt/freetds/{1.1.24 → 1.4.23}/lib/libct.dll.a +0 -0
- /data/ports/x64-mingw-ucrt/freetds/{1.1.24 → 1.4.23}/lib/libsybdb.dll.a +0 -0
- /data/test/schema/{sqlserver_2008.sql → sqlserver_2017.sql} +0 -0
data/.circleci/config.yml
DELETED
@@ -1,409 +0,0 @@
|
|
1
|
-
version: 2.1
|
2
|
-
|
3
|
-
orbs:
|
4
|
-
win: circleci/windows@4.1
|
5
|
-
ruby: circleci/ruby@2.0.0
|
6
|
-
|
7
|
-
commands:
|
8
|
-
install-ruby-windows:
|
9
|
-
description: "Install Ruby on Windows"
|
10
|
-
parameters:
|
11
|
-
ruby_version:
|
12
|
-
description: 'version tag for the cimg/ruby container'
|
13
|
-
type: string
|
14
|
-
steps:
|
15
|
-
- run:
|
16
|
-
name: remove pre-installed ruby
|
17
|
-
command: |
|
18
|
-
Get-ChildItem -path 'C:\tools\' -filter Ruby* | Remove-Item -Force -Recurse
|
19
|
-
|
20
|
-
- run:
|
21
|
-
name: download and install ruby devkit
|
22
|
-
command: |
|
23
|
-
$ProgressPreference='SilentlyContinue'
|
24
|
-
|
25
|
-
$uri = 'https://api.github.com/repos/oneclick/rubyinstaller2/tags?per_page=200'
|
26
|
-
$releases = ((Invoke-WebRequest $uri) | ConvertFrom-Json).name | select-string (-join("RubyInstaller-" , "<< parameters.ruby_version >>" ))
|
27
|
-
$target_release = (($releases | Sort-Object -Descending)[0] | Out-String).Trim()
|
28
|
-
$target_version = $target_release.Substring($target_release.Length - 7)
|
29
|
-
$download_uri = "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-$target_version/rubyinstaller-devkit-$target_version-x64.exe"
|
30
|
-
echo "Ruby Target Version Found: $target_version"
|
31
|
-
|
32
|
-
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
33
|
-
Invoke-WebRequest -UseBasicParsing -uri $download_uri -OutFile C:\ruby-setup.exe
|
34
|
-
|
35
|
-
echo "Download finished, starting installation of $target_version"
|
36
|
-
C:\ruby-setup.exe /VERYSILENT /NORESTART /ALLUSERS /DIR=C:/Ruby<< parameters.ruby_version >>-x64
|
37
|
-
|
38
|
-
- run:
|
39
|
-
name: ruby diagnostics
|
40
|
-
command: |
|
41
|
-
$Env:PATH = "C:\\Ruby<< parameters.ruby_version >>-x64\\bin;$Env:PATH"
|
42
|
-
echo "Perl Version:"
|
43
|
-
perl --version
|
44
|
-
echo "Ruby Version:"
|
45
|
-
ruby --version
|
46
|
-
echo "Gem Version:"
|
47
|
-
gem --version
|
48
|
-
|
49
|
-
- run:
|
50
|
-
name: install bundler
|
51
|
-
command: |
|
52
|
-
$Env:PATH = "C:\\Ruby<< parameters.ruby_version >>-x64\\bin;$Env:PATH"
|
53
|
-
gem install bundler -v 2.3.26
|
54
|
-
|
55
|
-
jobs:
|
56
|
-
test_linux:
|
57
|
-
parameters:
|
58
|
-
ruby_version:
|
59
|
-
description: 'version tag for the cimg/ruby container'
|
60
|
-
type: string
|
61
|
-
|
62
|
-
machine:
|
63
|
-
image: ubuntu-2004:current
|
64
|
-
|
65
|
-
# be sure to update the ./setup_cimgruby_dev.sh if changes are made to steps below
|
66
|
-
steps:
|
67
|
-
- checkout
|
68
|
-
|
69
|
-
- run:
|
70
|
-
name: start docker-compose build environment
|
71
|
-
command: |
|
72
|
-
sudo ./test/bin/setup_volume_permissions.sh
|
73
|
-
docker-compose up -d
|
74
|
-
echo "Waiting for containers to start..."
|
75
|
-
sleep 10
|
76
|
-
environment:
|
77
|
-
RUBY_VERSION: << parameters.ruby_version >>
|
78
|
-
|
79
|
-
- run:
|
80
|
-
name: install sql prereqs
|
81
|
-
command: |
|
82
|
-
docker exec cimg_ruby bash -c 'sudo -E ./test/bin/install-mssqltools.sh'
|
83
|
-
|
84
|
-
- run:
|
85
|
-
name: setup tiny_tds test database
|
86
|
-
command: |
|
87
|
-
docker exec cimg_ruby bash -c './test/bin/setup_tinytds_db.sh'
|
88
|
-
|
89
|
-
- run:
|
90
|
-
name: bundle install gems
|
91
|
-
command: |
|
92
|
-
docker exec cimg_ruby bash -c 'bundle install'
|
93
|
-
|
94
|
-
- run:
|
95
|
-
name: Write used versions into file
|
96
|
-
command: |
|
97
|
-
docker exec cimg_ruby bash -c 'bundle exec rake ports:version_file'
|
98
|
-
|
99
|
-
- restore_cache:
|
100
|
-
name: restore ports cache
|
101
|
-
keys:
|
102
|
-
- ports-<< parameters.ruby_version >>-{{ arch }}-{{ checksum ".ports_versions" }}
|
103
|
-
- ports-<< parameters.ruby_version >>-{{ arch }}-
|
104
|
-
|
105
|
-
- run:
|
106
|
-
name: compile ports
|
107
|
-
command: |
|
108
|
-
docker exec cimg_ruby bash -c 'bundle exec rake ports'
|
109
|
-
|
110
|
-
- run:
|
111
|
-
name: build gem
|
112
|
-
command: |
|
113
|
-
docker exec cimg_ruby bash -c 'bundle exec rake build'
|
114
|
-
|
115
|
-
- run:
|
116
|
-
name: Fix permissions on ports directory
|
117
|
-
command: |
|
118
|
-
docker exec cimg_ruby bash -c 'sudo chown -R $(id -u):$(id -g) ports'
|
119
|
-
|
120
|
-
- run:
|
121
|
-
name: test gem
|
122
|
-
command: |
|
123
|
-
docker exec cimg_ruby bash -c 'bundle exec rake test'
|
124
|
-
|
125
|
-
- save_cache:
|
126
|
-
name: save ports cache
|
127
|
-
paths:
|
128
|
-
- ./ports
|
129
|
-
key: ports-<< parameters.ruby_version >>-{{ arch }}-{{ arch }}-{{ checksum ".ports_versions" }}
|
130
|
-
|
131
|
-
- store_test_results:
|
132
|
-
path: test/reports
|
133
|
-
|
134
|
-
test_windows:
|
135
|
-
parameters:
|
136
|
-
ruby_version:
|
137
|
-
description: 'version tag for rubydev environment'
|
138
|
-
type: string
|
139
|
-
|
140
|
-
executor:
|
141
|
-
name: win/server-2022
|
142
|
-
shell: powershell.exe
|
143
|
-
|
144
|
-
environment:
|
145
|
-
RAKEOPT: '-rdevkit'
|
146
|
-
TESTOPTS: '-v'
|
147
|
-
MAKE: 'make V=1 -j2'
|
148
|
-
|
149
|
-
steps:
|
150
|
-
- install-ruby-windows:
|
151
|
-
ruby_version: << parameters.ruby_version >>
|
152
|
-
|
153
|
-
- checkout
|
154
|
-
|
155
|
-
- restore_cache:
|
156
|
-
name: restore gem cache
|
157
|
-
keys:
|
158
|
-
- v1-bundle-<< parameters.ruby_version >>-{{ arch }}-{{ .Branch }}-{{ checksum "tiny_tds.gemspec" }}
|
159
|
-
- v1-bundle-<< parameters.ruby_version >>-{{ arch }}-{{ .Branch }}-
|
160
|
-
- v1-bundle-<< parameters.ruby_version >>-{{ arch }}-
|
161
|
-
|
162
|
-
- run:
|
163
|
-
name: bundle install gems
|
164
|
-
command: |
|
165
|
-
$Env:PATH = "C:\\Ruby<< parameters.ruby_version >>-x64\\bin;$Env:PATH"
|
166
|
-
bundle install --path vendor/bundle
|
167
|
-
|
168
|
-
- save_cache:
|
169
|
-
name: save gem cache
|
170
|
-
paths:
|
171
|
-
- ./vendor/bundle
|
172
|
-
key: v1-bundle-<< parameters.ruby_version >>-{{ arch }}-{{ .Branch }}-{{ checksum "tiny_tds.gemspec" }}
|
173
|
-
|
174
|
-
- attach_workspace:
|
175
|
-
at: artifacts
|
176
|
-
|
177
|
-
- run:
|
178
|
-
name: install native gem and restore cross-compiled code from gem
|
179
|
-
command: |
|
180
|
-
$Env:PATH = "C:\\Ruby<< parameters.ruby_version >>-x64\\bin;$Env:PATH"
|
181
|
-
$rubyArchitecture = (ruby -e 'puts RUBY_PLATFORM').Trim()
|
182
|
-
$gemVersion = (Get-Content VERSION).Trim()
|
183
|
-
|
184
|
-
gem install --local --install-dir=./tmp "artifacts/gems/tiny_tds-$gemVersion-$rubyArchitecture.gem"
|
185
|
-
|
186
|
-
# Restore precompiled code
|
187
|
-
$source = (Resolve-Path ".\tmp\gems\tiny_tds-$gemVersion-$rubyArchitecture\lib\tiny_tds").Path
|
188
|
-
$destination = (Resolve-Path ".\lib\tiny_tds").Path
|
189
|
-
Get-ChildItem $source -Recurse -Exclude "*.rb" | Copy-Item -Destination {Join-Path $destination $_.FullName.Substring($source.length)}
|
190
|
-
|
191
|
-
# Restore ports
|
192
|
-
Copy-Item -Path ".\tmp\gems\tiny_tds-$gemVersion-$rubyArchitecture\ports" -Destination "." -Recurse
|
193
|
-
|
194
|
-
- restore_cache:
|
195
|
-
name: restore mssql installation file
|
196
|
-
key: downloads-{{ checksum "test/bin/install-mssql.ps1" }}
|
197
|
-
|
198
|
-
- run:
|
199
|
-
name: setup mssql
|
200
|
-
command: |
|
201
|
-
.\test\bin\install-mssql.ps1
|
202
|
-
|
203
|
-
- save_cache:
|
204
|
-
name: save downloads cache
|
205
|
-
paths:
|
206
|
-
- C:\Downloads
|
207
|
-
key: downloads-{{ checksum "test/bin/install-mssql.ps1" }}
|
208
|
-
|
209
|
-
- run:
|
210
|
-
name: install toxiproxy-server
|
211
|
-
command: |
|
212
|
-
choco install toxiproxy-server --version=2.5.0 -y
|
213
|
-
Start-Process toxiproxy-server
|
214
|
-
|
215
|
-
- run:
|
216
|
-
name: test gem
|
217
|
-
command: |
|
218
|
-
$Env:PATH = "C:\\Ruby<< parameters.ruby_version >>-x64\\bin;$Env:PATH"
|
219
|
-
bundle exec rake test
|
220
|
-
environment:
|
221
|
-
TOXIPROXY_HOST: "localhost"
|
222
|
-
|
223
|
-
- store_test_results:
|
224
|
-
path: test/reports
|
225
|
-
|
226
|
-
- run:
|
227
|
-
name: Rename gem to a consistent name to store artifact
|
228
|
-
command: |
|
229
|
-
$Env:PATH = "C:\\Ruby<< parameters.ruby_version >>-x64\\bin;$Env:PATH"
|
230
|
-
$rubyArchitecture = (ruby -e 'puts RUBY_PLATFORM').Trim()
|
231
|
-
$gemVersion = (Get-Content VERSION).Trim()
|
232
|
-
|
233
|
-
New-Item -Path . -Name "tested_artifact" -ItemType "directory"
|
234
|
-
Move-Item "artifacts/gems/tiny_tds-$gemVersion-$rubyArchitecture.gem" "tested_artifact"
|
235
|
-
|
236
|
-
- store_artifacts:
|
237
|
-
path: tested_artifact
|
238
|
-
|
239
|
-
cross_compile_gem:
|
240
|
-
parameters:
|
241
|
-
platform:
|
242
|
-
description: "Platform to compile the gem resources"
|
243
|
-
type: string
|
244
|
-
|
245
|
-
docker:
|
246
|
-
- image: "ghcr.io/rake-compiler/rake-compiler-dock-image:1.4.0-mri-<< parameters.platform >>"
|
247
|
-
|
248
|
-
steps:
|
249
|
-
- checkout
|
250
|
-
|
251
|
-
- run:
|
252
|
-
name: bundle install gems
|
253
|
-
command: |
|
254
|
-
bundle install
|
255
|
-
|
256
|
-
- run:
|
257
|
-
name: Write used versions for ports into file
|
258
|
-
command: |
|
259
|
-
rake ports:version_file[<< parameters.platform >>]
|
260
|
-
|
261
|
-
- restore_cache:
|
262
|
-
name: restore ports cache
|
263
|
-
keys:
|
264
|
-
- ports-win-{{ arch }}-{{ checksum ".ports_versions" }}
|
265
|
-
- ports-win-{{ arch }}-
|
266
|
-
|
267
|
-
- run:
|
268
|
-
name: Build gem
|
269
|
-
command: |
|
270
|
-
rake gem:for_platform[<< parameters.platform >>]
|
271
|
-
|
272
|
-
- run:
|
273
|
-
name: Move gems into separate directory before caching
|
274
|
-
command: |
|
275
|
-
mkdir -p artifacts-<< parameters.platform >>/gems
|
276
|
-
mv pkg/*.gem artifacts-<< parameters.platform >>/gems
|
277
|
-
|
278
|
-
- run:
|
279
|
-
name: Remove non-native gem to avoid conflict in workspace
|
280
|
-
command: |
|
281
|
-
gemVersion=$(cat VERSION | tr -d "[:space:]")
|
282
|
-
rm -rf artifacts-<< parameters.platform >>/gems/tiny_tds-$gemVersion.gem
|
283
|
-
|
284
|
-
- store_artifacts:
|
285
|
-
path: artifacts-<< parameters.platform >>/gems
|
286
|
-
|
287
|
-
- save_cache:
|
288
|
-
name: save ports cache
|
289
|
-
paths:
|
290
|
-
- ./ports
|
291
|
-
key: ports-win-{{ arch }}-{{ checksum ".ports_versions" }}
|
292
|
-
|
293
|
-
- persist_to_workspace:
|
294
|
-
name: save gems into workspace
|
295
|
-
root: artifacts-<< parameters.platform >>
|
296
|
-
paths:
|
297
|
-
- gems
|
298
|
-
|
299
|
-
install_windows:
|
300
|
-
parameters:
|
301
|
-
ruby_version:
|
302
|
-
description: 'version tag for rubydev environment'
|
303
|
-
type: string
|
304
|
-
|
305
|
-
executor:
|
306
|
-
name: win/server-2022
|
307
|
-
shell: powershell.exe
|
308
|
-
|
309
|
-
environment:
|
310
|
-
RAKEOPT: '-rdevkit'
|
311
|
-
TESTOPTS: '-v'
|
312
|
-
MAKE: 'make V=1 -j2'
|
313
|
-
|
314
|
-
steps:
|
315
|
-
- install-ruby-windows:
|
316
|
-
ruby_version: << parameters.ruby_version >>
|
317
|
-
|
318
|
-
- run:
|
319
|
-
name: Ensure msys2 installation is complete
|
320
|
-
command: |
|
321
|
-
$Env:PATH = "C:\\Ruby<< parameters.ruby_version >>-x64\\bin;$Env:PATH"
|
322
|
-
|
323
|
-
# on older Ruby version, the msys version shipped with RubyInstaller is quite old
|
324
|
-
# and RubyInstaller will be unable to install anything because of outdated keys
|
325
|
-
# With this those commands, we force to get a new set of keys
|
326
|
-
# see https://www.msys2.org/docs/updating/#potential-issues
|
327
|
-
ridk exec pacman-key --init
|
328
|
-
ridk exec pacman-key --refresh-keys
|
329
|
-
ridk install 1 2 3
|
330
|
-
|
331
|
-
- checkout
|
332
|
-
|
333
|
-
- restore_cache:
|
334
|
-
name: restore gem cache
|
335
|
-
keys:
|
336
|
-
- v1-bundle-<< parameters.ruby_version >>-{{ arch }}-{{ .Branch }}-{{ checksum "tiny_tds.gemspec" }}
|
337
|
-
- v1-bundle-<< parameters.ruby_version >>-{{ arch }}-{{ .Branch }}-
|
338
|
-
- v1-bundle-<< parameters.ruby_version >>-{{ arch }}-
|
339
|
-
|
340
|
-
- run:
|
341
|
-
name: bundle install gems
|
342
|
-
command: |
|
343
|
-
$Env:PATH = "C:\\Ruby<< parameters.ruby_version >>-x64\\bin;$Env:PATH"
|
344
|
-
bundle install --path vendor/bundle
|
345
|
-
|
346
|
-
- save_cache:
|
347
|
-
name: save gem cache
|
348
|
-
paths:
|
349
|
-
- ./vendor/bundle
|
350
|
-
key: v1-bundle-<< parameters.ruby_version >>-{{ arch }}-{{ .Branch }}-{{ checksum "tiny_tds.gemspec" }}
|
351
|
-
|
352
|
-
- run:
|
353
|
-
name: build gem
|
354
|
-
command: |
|
355
|
-
$Env:PATH = "C:\\Ruby<< parameters.ruby_version >>-x64\\bin;$Env:PATH"
|
356
|
-
gem build tiny_tds.gemspec
|
357
|
-
|
358
|
-
- run:
|
359
|
-
name: Install gem
|
360
|
-
command: |
|
361
|
-
$Env:PATH = "C:\\Ruby<< parameters.ruby_version >>-x64\\bin;$Env:PATH"
|
362
|
-
$gemVersion = (Get-Content VERSION).Trim()
|
363
|
-
gem install --local "tiny_tds-$gemVersion.gem"
|
364
|
-
|
365
|
-
- run:
|
366
|
-
name: Check if gem loads correctly
|
367
|
-
command: |
|
368
|
-
$Env:PATH = "C:\\Ruby<< parameters.ruby_version >>-x64\\bin;$Env:PATH"
|
369
|
-
ruby -e "require 'tiny_tds'; puts TinyTds::Gem.root_path"
|
370
|
-
exit $LASTEXITCODE
|
371
|
-
|
372
|
-
workflows:
|
373
|
-
test_supported_ruby_versions:
|
374
|
-
jobs:
|
375
|
-
- cross_compile_gem:
|
376
|
-
matrix:
|
377
|
-
parameters:
|
378
|
-
platform:
|
379
|
-
- "x86-mingw32"
|
380
|
-
- "x64-mingw32"
|
381
|
-
- "x64-mingw-ucrt"
|
382
|
-
- test_windows:
|
383
|
-
requires:
|
384
|
-
- cross_compile_gem
|
385
|
-
matrix: &ruby_versions
|
386
|
-
parameters:
|
387
|
-
ruby_version:
|
388
|
-
- '2.4'
|
389
|
-
- '2.5'
|
390
|
-
- '2.6'
|
391
|
-
- '2.7'
|
392
|
-
- '3.0'
|
393
|
-
- '3.1'
|
394
|
-
- '3.2'
|
395
|
-
- '3.3'
|
396
|
-
- test_linux:
|
397
|
-
matrix: *ruby_versions
|
398
|
-
|
399
|
-
- install_windows:
|
400
|
-
matrix:
|
401
|
-
parameters:
|
402
|
-
ruby_version:
|
403
|
-
- '2.5'
|
404
|
-
- '2.6'
|
405
|
-
- '2.7'
|
406
|
-
- '3.0'
|
407
|
-
- '3.1'
|
408
|
-
- '3.2'
|
409
|
-
- '3.3'
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,140 +0,0 @@
|
|
1
|
-
|
2
|
-
/*
|
3
|
-
|
4
|
-
* Binary Data - Our test binary data is a 1 pixel gif. The basic (raw) data is below. Quoting this data
|
5
|
-
would involve this (encode) method and be (encoded) with the 0x prefix for raw SQL. In other clients the
|
6
|
-
(raw_db) value without the 0x prefix would need to be (packed) again yield the original (raw) value.
|
7
|
-
|
8
|
-
(raw) - "GIF89a\001\000\001\000\221\000\000\377\377\377\377\377\377\376\001\002\000\000\000!\371\004\004\024\000\377\000,\000\000\000\000\001\000\001\000\000\002\002D\001\000;"
|
9
|
-
(encode) - "0x#{raw.unpack("H*")[0]}"
|
10
|
-
(encoded) - "0x47494638396101000100910000fffffffffffffe010200000021f904041400ff002c00000000010001000002024401003b"
|
11
|
-
(raw_db) - "47494638396101000100910000fffffffffffffe010200000021f904041400ff002c00000000010001000002024401003b"
|
12
|
-
(packed) - [raw_db].pack('H*')
|
13
|
-
|
14
|
-
*/
|
15
|
-
|
16
|
-
CREATE TABLE [dbo].[datatypes] (
|
17
|
-
[id] [int] NOT NULL IDENTITY(1,1) PRIMARY KEY,
|
18
|
-
[bigint] [bigint] NULL,
|
19
|
-
[binary_50] [binary](50) NULL,
|
20
|
-
[bit] [bit] NULL,
|
21
|
-
[char_10] [char](10) NULL,
|
22
|
-
-- [date] [date] NULL,
|
23
|
-
[datetime] [datetime] NULL,
|
24
|
-
-- [datetime2_7] [datetime2](7) NULL,
|
25
|
-
-- [datetime2_2] [datetime2](2) NULL,
|
26
|
-
-- [datetimeoffset_2] [datetimeoffset](2) NULL,
|
27
|
-
-- [datetimeoffset_7] [datetimeoffset](7) NULL,
|
28
|
-
[decimal_9_2] [decimal](9, 2) NULL,
|
29
|
-
[decimal_16_4] [decimal](16, 4) NULL,
|
30
|
-
[float] [float] NULL,
|
31
|
-
-- [geography] [geography] NULL,
|
32
|
-
-- [geometry] [geometry] NULL,
|
33
|
-
-- [hierarchyid] [hierarchyid] NULL,
|
34
|
-
[image] [image] NULL,
|
35
|
-
[int] [int] NULL,
|
36
|
-
[money] [money] NULL,
|
37
|
-
[nchar_10] [nchar](10) NULL,
|
38
|
-
[ntext] [ntext] NULL,
|
39
|
-
[numeric_18_0] [numeric](18, 0) NULL,
|
40
|
-
[numeric_36_2] [numeric](36, 2) NULL,
|
41
|
-
[nvarchar_50] [nvarchar](50) NULL,
|
42
|
-
-- [nvarchar_max] [nvarchar](max) NULL,
|
43
|
-
[real] [real] NULL,
|
44
|
-
[smalldatetime] [smalldatetime] NULL,
|
45
|
-
[smallint] [smallint] NULL,
|
46
|
-
[smallmoney] [smallmoney] NULL,
|
47
|
-
[text] [text] NULL,
|
48
|
-
-- [time_2] [time](2) NULL,
|
49
|
-
-- [time_7] [time](7) NULL,
|
50
|
-
[timestamp] [timestamp] NULL,
|
51
|
-
[tinyint] [tinyint] NULL,
|
52
|
-
[uniqueidentifier] [uniqueidentifier] NULL,
|
53
|
-
[varbinary_50] [varbinary](50) NULL,
|
54
|
-
-- [varbinary_max] [varbinary](max) NULL,
|
55
|
-
[varchar_50] [varchar](50) NULL
|
56
|
-
-- [varchar_max] [varchar](max) NULL,
|
57
|
-
-- [xml] [xml] NULL
|
58
|
-
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
59
|
-
|
60
|
-
SET IDENTITY_INSERT [datatypes] ON
|
61
|
-
|
62
|
-
INSERT INTO [datatypes] ([id], [bigint]) VALUES ( 11, -9223372036854775807 )
|
63
|
-
INSERT INTO [datatypes] ([id], [bigint]) VALUES ( 12, 9223372036854775806 )
|
64
|
-
INSERT INTO [datatypes] ([id], [binary_50]) VALUES ( 21, 0x47494638396101000100910000fffffffffffffe010200000021f904041400ff002c00000000010001000002024401003b )
|
65
|
-
INSERT INTO [datatypes] ([id], [bit]) VALUES ( 31, 1 )
|
66
|
-
INSERT INTO [datatypes] ([id], [bit]) VALUES ( 32, 0 )
|
67
|
-
INSERT INTO [datatypes] ([id], [char_10]) VALUES ( 41, '1234567890' )
|
68
|
-
INSERT INTO [datatypes] ([id], [char_10]) VALUES ( 42, '12345678' )
|
69
|
-
-- INSERT INTO [datatypes] ([id], [date]) VALUES ( 51, '0001-01-01' )
|
70
|
-
-- INSERT INTO [datatypes] ([id], [date]) VALUES ( 52, '9999-12-31' )
|
71
|
-
INSERT INTO [datatypes] ([id], [datetime]) VALUES ( 61, '1753-01-01T00:00:00.000' )
|
72
|
-
INSERT INTO [datatypes] ([id], [datetime]) VALUES ( 62, '9999-12-31T23:59:59.997' )
|
73
|
-
INSERT INTO [datatypes] ([id], [datetime]) VALUES ( 63, '2010-01-01T12:34:56.123' )
|
74
|
-
-- INSERT INTO [datatypes] ([id], [datetime2_7]) VALUES ( 71, '0001-01-01 00:00:00.0000000' )
|
75
|
-
-- INSERT INTO [datatypes] ([id], [datetime2_7]) VALUES ( 72, '1984-01-24 04:20:00.0000000' )
|
76
|
-
-- INSERT INTO [datatypes] ([id], [datetime2_7]) VALUES ( 73, '9999-12-31 23:59:59.9999999' )
|
77
|
-
-- INSERT INTO [datatypes] ([id], [datetime2_2]) VALUES ( 74, '9999-12-31 23:59:59.123456789' )
|
78
|
-
-- INSERT INTO [datatypes] ([id], [datetimeoffset_2]) VALUES ( 81, '1984-01-24T04:20:00.1234567-08:00' ) -- 1984-01-24 04:20:00.00 -08:00
|
79
|
-
-- INSERT INTO [datatypes] ([id], [datetimeoffset_2]) VALUES ( 82, '1984-01-24T04:20:00.0000000Z' ) -- 1984-01-24 04:20:00.00 +00:00
|
80
|
-
-- INSERT INTO [datatypes] ([id], [datetimeoffset_2]) VALUES ( 83, '9999-12-31T23:59:59.9999999Z' ) -- 9999-12-31 23:59:59.99 +00:00
|
81
|
-
-- INSERT INTO [datatypes] ([id], [datetimeoffset_7]) VALUES ( 84, '1984-01-24T04:20:59.1234567-08:00' ) -- 1984-01-24 04:20:59.1234567 -08:00
|
82
|
-
-- INSERT INTO [datatypes] ([id], [datetimeoffset_7]) VALUES ( 85, '1984-01-24T04:20:00.0000000Z' ) -- 1984-01-24 04:20:00.0000000 +00:00
|
83
|
-
-- INSERT INTO [datatypes] ([id], [datetimeoffset_7]) VALUES ( 86, '9999-12-31T23:59:59.9999999Z' ) -- 9999-12-31 23:59:59.9999999 +00:00
|
84
|
-
INSERT INTO [datatypes] ([id], [decimal_9_2]) VALUES ( 91, 12345.01 )
|
85
|
-
INSERT INTO [datatypes] ([id], [decimal_9_2]) VALUES ( 92, 1234567.89 )
|
86
|
-
INSERT INTO [datatypes] ([id], [decimal_16_4]) VALUES ( 93, 0.0 )
|
87
|
-
INSERT INTO [datatypes] ([id], [decimal_16_4]) VALUES ( 94, 123456789012.3456 )
|
88
|
-
INSERT INTO [datatypes] ([id], [float]) VALUES ( 101, 123.00000001 )
|
89
|
-
INSERT INTO [datatypes] ([id], [float]) VALUES ( 102, 0.0 )
|
90
|
-
INSERT INTO [datatypes] ([id], [float]) VALUES ( 103, 123.45 )
|
91
|
-
-- INSERT INTO [datatypes] ([id], [geography]) VALUES ( 111, geography::STGeomFromText('LINESTRING(-122.360 47.656, -122.343 47.656)', 4326) ) -- 0xE610000001148716D9CEF7D34740D7A3703D0A975EC08716D9CEF7D34740CBA145B6F3955EC0
|
92
|
-
-- INSERT INTO [datatypes] ([id], [geometry]) VALUES ( 121, geometry::STGeomFromText('LINESTRING (100 100, 20 180, 180 180)', 0) ) -- 0x0000000001040300000000000000000059400000000000005940000000000000344000000000008066400000000000806640000000000080664001000000010000000001000000FFFFFFFF0000000002
|
93
|
-
-- INSERT INTO [datatypes] ([id], [hierarchyid]) VALUES ( 131, CAST('/1/' AS hierarchyid) ) -- 0x58
|
94
|
-
-- INSERT INTO [datatypes] ([id], [hierarchyid]) VALUES ( 132, CAST('/2/' AS hierarchyid) ) -- 0x68
|
95
|
-
INSERT INTO [datatypes] ([id], [image]) VALUES ( 141, 0x47494638396101000100910000fffffffffffffe010200000021f904041400ff002c00000000010001000002024401003b )
|
96
|
-
INSERT INTO [datatypes] ([id], [int]) VALUES ( 151, -2147483647 )
|
97
|
-
INSERT INTO [datatypes] ([id], [int]) VALUES ( 152, 2147483646 )
|
98
|
-
INSERT INTO [datatypes] ([id], [money]) VALUES ( 161, 4.20 )
|
99
|
-
INSERT INTO [datatypes] ([id], [money]) VALUES ( 162, -922337203685477.5807 )
|
100
|
-
INSERT INTO [datatypes] ([id], [money]) VALUES ( 163, 922337203685477.5806 )
|
101
|
-
INSERT INTO [datatypes] ([id], [nchar_10]) VALUES ( 171, N'1234567890' )
|
102
|
-
INSERT INTO [datatypes] ([id], [nchar_10]) VALUES ( 172, N'123456åå' )
|
103
|
-
INSERT INTO [datatypes] ([id], [nchar_10]) VALUES ( 173, N'abc123' )
|
104
|
-
INSERT INTO [datatypes] ([id], [ntext]) VALUES ( 181, N'test ntext' )
|
105
|
-
INSERT INTO [datatypes] ([id], [ntext]) VALUES ( 182, N'test ntext åå' )
|
106
|
-
INSERT INTO [datatypes] ([id], [numeric_18_0]) VALUES ( 191, 191 )
|
107
|
-
INSERT INTO [datatypes] ([id], [numeric_18_0]) VALUES ( 192, 123456789012345678 )
|
108
|
-
INSERT INTO [datatypes] ([id], [numeric_36_2]) VALUES ( 193, 12345678901234567890.01 )
|
109
|
-
INSERT INTO [datatypes] ([id], [numeric_36_2]) VALUES ( 194, 123.46 )
|
110
|
-
INSERT INTO [datatypes] ([id], [nvarchar_50]) VALUES ( 201, N'test nvarchar_50' )
|
111
|
-
INSERT INTO [datatypes] ([id], [nvarchar_50]) VALUES ( 202, N'test nvarchar_50 åå' )
|
112
|
-
-- INSERT INTO [datatypes] ([id], [nvarchar_max]) VALUES ( 211, N'test nvarchar_max' )
|
113
|
-
-- INSERT INTO [datatypes] ([id], [nvarchar_max]) VALUES ( 212, N'test nvarchar_max åå' )
|
114
|
-
INSERT INTO [datatypes] ([id], [real]) VALUES ( 221, 123.45 )
|
115
|
-
INSERT INTO [datatypes] ([id], [real]) VALUES ( 222, 0.0 )
|
116
|
-
INSERT INTO [datatypes] ([id], [real]) VALUES ( 223, 0.00001 )
|
117
|
-
INSERT INTO [datatypes] ([id], [smalldatetime]) VALUES ( 231, '1901-01-01T15:45:00.000' ) -- 1901-01-01 15:45:00
|
118
|
-
INSERT INTO [datatypes] ([id], [smalldatetime]) VALUES ( 232, '2078-06-05T04:20:00.000' ) -- 2078-06-05 04:20:00
|
119
|
-
INSERT INTO [datatypes] ([id], [smallint]) VALUES ( 241, -32767 )
|
120
|
-
INSERT INTO [datatypes] ([id], [smallint]) VALUES ( 242, 32766 )
|
121
|
-
INSERT INTO [datatypes] ([id], [smallmoney]) VALUES ( 251, 4.20 )
|
122
|
-
INSERT INTO [datatypes] ([id], [smallmoney]) VALUES ( 252, -214748.3647 )
|
123
|
-
INSERT INTO [datatypes] ([id], [smallmoney]) VALUES ( 253, 214748.3646 )
|
124
|
-
INSERT INTO [datatypes] ([id], [text]) VALUES ( 271, 'test text' )
|
125
|
-
-- INSERT INTO [datatypes] ([id], [time_2]) VALUES ( 281, '15:45:00.709714966' ) -- 15:45:00.71
|
126
|
-
-- INSERT INTO [datatypes] ([id], [time_2]) VALUES ( 282, '04:20:00.288321545' ) -- 04:20:00.29
|
127
|
-
-- INSERT INTO [datatypes] ([id], [time_7]) VALUES ( 283, '15:45:00.709714966' ) -- 15:45:00.709714900
|
128
|
-
-- INSERT INTO [datatypes] ([id], [time_7]) VALUES ( 284, '04:20:00.288321545' ) -- 04:20:00.288321500
|
129
|
-
INSERT INTO [datatypes] ([id], [tinyint]) VALUES ( 301, 0 )
|
130
|
-
INSERT INTO [datatypes] ([id], [tinyint]) VALUES ( 302, 255 )
|
131
|
-
INSERT INTO [datatypes] ([id], [uniqueidentifier]) VALUES ( 311, NEWID() )
|
132
|
-
INSERT INTO [datatypes] ([id], [varbinary_50]) VALUES ( 321, 0x47494638396101000100910000fffffffffffffe010200000021f904041400ff002c00000000010001000002024401003b )
|
133
|
-
-- INSERT INTO [datatypes] ([id], [varbinary_max]) VALUES ( 331, 0x47494638396101000100910000fffffffffffffe010200000021f904041400ff002c00000000010001000002024401003b )
|
134
|
-
INSERT INTO [datatypes] ([id], [varchar_50]) VALUES ( 341, 'test varchar_50' )
|
135
|
-
-- INSERT INTO [datatypes] ([id], [varchar_max]) VALUES ( 351, 'test varchar_max' )
|
136
|
-
-- INSERT INTO [datatypes] ([id], [xml]) VALUES ( 361, '<foo><bar>batz</bar></foo>' )
|
137
|
-
|
138
|
-
SET IDENTITY_INSERT [datatypes] OFF
|
139
|
-
|
140
|
-
|