tiny_tds 2.1.2 → 3.2.0

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 (64) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/ci.yml +590 -0
  3. data/.gitignore +2 -0
  4. data/CHANGELOG.md +51 -1
  5. data/Gemfile +1 -8
  6. data/ISSUE_TEMPLATE.md +1 -1
  7. data/README.md +89 -89
  8. data/Rakefile +44 -30
  9. data/VERSION +1 -1
  10. data/docker-compose.yml +34 -0
  11. data/ext/tiny_tds/client.c +100 -59
  12. data/ext/tiny_tds/client.h +5 -3
  13. data/ext/tiny_tds/extconf.rb +173 -52
  14. data/ext/tiny_tds/extconsts.rb +4 -11
  15. data/ext/tiny_tds/result.c +52 -45
  16. data/ext/tiny_tds/tiny_tds_ext.c +4 -1
  17. data/lib/tiny_tds/bin.rb +12 -26
  18. data/lib/tiny_tds/client.rb +38 -42
  19. data/lib/tiny_tds/error.rb +0 -2
  20. data/lib/tiny_tds/gem.rb +5 -14
  21. data/lib/tiny_tds/result.rb +0 -2
  22. data/lib/tiny_tds/version.rb +1 -1
  23. data/lib/tiny_tds.rb +28 -47
  24. data/setup_cimgruby_dev.sh +25 -0
  25. data/start_dev.sh +21 -0
  26. data/tasks/native_gem.rake +12 -10
  27. data/tasks/package.rake +1 -3
  28. data/tasks/ports.rake +14 -77
  29. data/tasks/test.rake +3 -5
  30. data/test/bin/install-freetds.sh +2 -4
  31. data/test/bin/install-mssql.ps1 +42 -0
  32. data/test/bin/install-mssqltools.sh +9 -0
  33. data/test/bin/restore-from-native-gem.ps1 +10 -0
  34. data/test/bin/setup_tinytds_db.sh +7 -0
  35. data/test/bin/setup_volume_permissions.sh +10 -0
  36. data/test/client_test.rb +152 -116
  37. data/test/gem_test.rb +39 -118
  38. data/test/result_test.rb +285 -350
  39. data/test/schema_test.rb +369 -395
  40. data/test/sql/db-create.sql +18 -0
  41. data/test/sql/db-login.sql +38 -0
  42. data/test/test_helper.rb +112 -85
  43. data/test/thread_test.rb +22 -31
  44. data/tiny_tds.gemspec +28 -26
  45. metadata +85 -59
  46. data/.travis.yml +0 -24
  47. data/BACKERS.md +0 -32
  48. data/appveyor.yml +0 -51
  49. data/tasks/ports/freetds.rb +0 -37
  50. data/tasks/ports/libiconv.rb +0 -43
  51. data/tasks/ports/openssl.rb +0 -78
  52. data/tasks/ports/recipe.rb +0 -52
  53. data/test/appveyor/dbsetup.ps1 +0 -27
  54. data/test/appveyor/dbsetup.sql +0 -9
  55. data/test/benchmark/query.rb +0 -77
  56. data/test/benchmark/query_odbc.rb +0 -106
  57. data/test/benchmark/query_tinytds.rb +0 -126
  58. data/test/bin/setup.sh +0 -19
  59. data/test/schema/sqlserver_2000.sql +0 -140
  60. data/test/schema/sqlserver_2005.sql +0 -140
  61. data/test/schema/sqlserver_2014.sql +0 -140
  62. data/test/schema/sqlserver_2016.sql +0 -140
  63. data/test/schema/sybase_ase.sql +0 -138
  64. /data/test/schema/{sqlserver_2008.sql → sqlserver_2017.sql} +0 -0
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.2
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ken Collins
@@ -10,92 +10,148 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2018-05-29 00:00:00.000000000 Z
13
+ date: 2025-02-11 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
18
32
  requirements:
19
33
  - - "~>"
20
34
  - !ruby/object:Gem::Version
21
- version: '2.0'
35
+ version: 2.8.0
22
36
  type: :development
23
37
  prerelease: false
24
38
  version_requirements: !ruby/object:Gem::Requirement
25
39
  requirements:
26
40
  - - "~>"
27
41
  - !ruby/object:Gem::Version
28
- version: '2.0'
42
+ version: 2.8.0
29
43
  - !ruby/object:Gem::Dependency
30
44
  name: rake
31
45
  requirement: !ruby/object:Gem::Requirement
32
46
  requirements:
33
47
  - - "~>"
34
48
  - !ruby/object:Gem::Version
35
- version: '10.4'
49
+ version: 13.0.0
36
50
  type: :development
37
51
  prerelease: false
38
52
  version_requirements: !ruby/object:Gem::Requirement
39
53
  requirements:
40
54
  - - "~>"
41
55
  - !ruby/object:Gem::Version
42
- version: '10.4'
56
+ version: 13.0.0
43
57
  - !ruby/object:Gem::Dependency
44
58
  name: rake-compiler
45
59
  requirement: !ruby/object:Gem::Requirement
46
60
  requirements:
47
61
  - - "~>"
48
62
  - !ruby/object:Gem::Version
49
- version: '1.0'
63
+ version: '1.2'
50
64
  type: :development
51
65
  prerelease: false
52
66
  version_requirements: !ruby/object:Gem::Requirement
53
67
  requirements:
54
68
  - - "~>"
55
69
  - !ruby/object:Gem::Version
56
- version: '1.0'
70
+ version: '1.2'
57
71
  - !ruby/object:Gem::Dependency
58
72
  name: rake-compiler-dock
59
73
  requirement: !ruby/object:Gem::Requirement
60
74
  requirements:
61
75
  - - "~>"
62
76
  - !ruby/object:Gem::Version
63
- version: 0.6.3
77
+ version: 1.9.1
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: 0.6.3
84
+ version: 1.9.1
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.6'
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.6'
98
+ version: '5.25'
99
+ - !ruby/object:Gem::Dependency
100
+ name: minitest-reporters
101
+ requirement: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - "~>"
104
+ - !ruby/object:Gem::Version
105
+ version: 1.6.1
106
+ type: :development
107
+ prerelease: false
108
+ version_requirements: !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - - "~>"
111
+ - !ruby/object:Gem::Version
112
+ version: 1.6.1
85
113
  - !ruby/object:Gem::Dependency
86
114
  name: connection_pool
87
115
  requirement: !ruby/object:Gem::Requirement
88
116
  requirements:
89
117
  - - "~>"
90
118
  - !ruby/object:Gem::Version
91
- version: '2.2'
119
+ version: 2.2.0
92
120
  type: :development
93
121
  prerelease: false
94
122
  version_requirements: !ruby/object:Gem::Requirement
95
123
  requirements:
96
124
  - - "~>"
97
125
  - !ruby/object:Gem::Version
98
- version: '2.2'
126
+ version: 2.2.0
127
+ - !ruby/object:Gem::Dependency
128
+ name: toxiproxy
129
+ requirement: !ruby/object:Gem::Requirement
130
+ requirements:
131
+ - - "~>"
132
+ - !ruby/object:Gem::Version
133
+ version: 2.0.0
134
+ type: :development
135
+ prerelease: false
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ requirements:
138
+ - - "~>"
139
+ - !ruby/object:Gem::Version
140
+ version: 2.0.0
141
+ - !ruby/object:Gem::Dependency
142
+ name: standard
143
+ requirement: !ruby/object:Gem::Requirement
144
+ requirements:
145
+ - - "~>"
146
+ - !ruby/object:Gem::Version
147
+ version: 1.31.0
148
+ type: :development
149
+ prerelease: false
150
+ version_requirements: !ruby/object:Gem::Requirement
151
+ requirements:
152
+ - - "~>"
153
+ - !ruby/object:Gem::Version
154
+ version: 1.31.0
99
155
  description: TinyTDS - A modern, simple and fast FreeTDS library for Ruby using DB-Library.
100
156
  Developed for the ActiveRecord SQL Server adapter.
101
157
  email:
@@ -110,10 +166,9 @@ extra_rdoc_files: []
110
166
  files:
111
167
  - ".codeclimate.yml"
112
168
  - ".gitattributes"
169
+ - ".github/workflows/ci.yml"
113
170
  - ".gitignore"
114
171
  - ".rubocop.yml"
115
- - ".travis.yml"
116
- - BACKERS.md
117
172
  - CHANGELOG.md
118
173
  - CODE_OF_CONDUCT.md
119
174
  - Gemfile
@@ -122,9 +177,9 @@ files:
122
177
  - README.md
123
178
  - Rakefile
124
179
  - VERSION
125
- - appveyor.yml
126
180
  - bin/defncopy-ttds
127
181
  - bin/tsql-ttds
182
+ - docker-compose.yml
128
183
  - exe/.keep
129
184
  - ext/tiny_tds/client.c
130
185
  - ext/tiny_tds/client.h
@@ -144,34 +199,28 @@ files:
144
199
  - patches/freetds/1.00.27/0001-mingw_missing_inet_pton.diff
145
200
  - patches/freetds/1.00.27/0002-Don-t-use-MSYS2-file-libws2_32.diff
146
201
  - patches/libiconv/1.14/1-avoid-gets-error.patch
202
+ - setup_cimgruby_dev.sh
203
+ - start_dev.sh
147
204
  - tasks/native_gem.rake
148
205
  - tasks/package.rake
149
206
  - tasks/ports.rake
150
- - tasks/ports/freetds.rb
151
- - tasks/ports/libiconv.rb
152
- - tasks/ports/openssl.rb
153
- - tasks/ports/recipe.rb
154
207
  - tasks/test.rake
155
- - test/appveyor/dbsetup.ps1
156
- - test/appveyor/dbsetup.sql
157
- - test/benchmark/query.rb
158
- - test/benchmark/query_odbc.rb
159
- - test/benchmark/query_tinytds.rb
160
208
  - test/bin/install-freetds.sh
209
+ - test/bin/install-mssql.ps1
210
+ - test/bin/install-mssqltools.sh
161
211
  - test/bin/install-openssl.sh
162
- - test/bin/setup.sh
212
+ - test/bin/restore-from-native-gem.ps1
213
+ - test/bin/setup_tinytds_db.sh
214
+ - test/bin/setup_volume_permissions.sh
163
215
  - test/client_test.rb
164
216
  - test/gem_test.rb
165
217
  - test/result_test.rb
166
218
  - test/schema/1px.gif
167
- - test/schema/sqlserver_2000.sql
168
- - test/schema/sqlserver_2005.sql
169
- - test/schema/sqlserver_2008.sql
170
- - test/schema/sqlserver_2014.sql
171
- - test/schema/sqlserver_2016.sql
219
+ - test/schema/sqlserver_2017.sql
172
220
  - test/schema/sqlserver_azure.sql
173
- - test/schema/sybase_ase.sql
174
221
  - test/schema_test.rb
222
+ - test/sql/db-create.sql
223
+ - test/sql/db-login.sql
175
224
  - test/test_helper.rb
176
225
  - test/thread_test.rb
177
226
  - tiny_tds.gemspec
@@ -189,38 +238,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
189
238
  requirements:
190
239
  - - ">="
191
240
  - !ruby/object:Gem::Version
192
- version: 2.0.0
241
+ version: 2.7.0
193
242
  required_rubygems_version: !ruby/object:Gem::Requirement
194
243
  requirements:
195
244
  - - ">="
196
245
  - !ruby/object:Gem::Version
197
246
  version: '0'
198
247
  requirements: []
199
- rubyforge_project:
200
- rubygems_version: 2.6.8
248
+ rubygems_version: 3.1.6
201
249
  signing_key:
202
250
  specification_version: 4
203
251
  summary: TinyTDS - A modern, simple and fast FreeTDS library for Ruby using DB-Library.
204
- test_files:
205
- - test/appveyor/dbsetup.ps1
206
- - test/appveyor/dbsetup.sql
207
- - test/benchmark/query.rb
208
- - test/benchmark/query_odbc.rb
209
- - test/benchmark/query_tinytds.rb
210
- - test/bin/install-freetds.sh
211
- - test/bin/install-openssl.sh
212
- - test/bin/setup.sh
213
- - test/client_test.rb
214
- - test/gem_test.rb
215
- - test/result_test.rb
216
- - test/schema/1px.gif
217
- - test/schema/sqlserver_2000.sql
218
- - test/schema/sqlserver_2005.sql
219
- - test/schema/sqlserver_2008.sql
220
- - test/schema/sqlserver_2014.sql
221
- - test/schema/sqlserver_2016.sql
222
- - test/schema/sqlserver_azure.sql
223
- - test/schema/sybase_ase.sql
224
- - test/schema_test.rb
225
- - test/test_helper.rb
226
- - test/thread_test.rb
252
+ test_files: []
data/.travis.yml DELETED
@@ -1,24 +0,0 @@
1
- sudo: required
2
- cache: bundler
3
- services:
4
- - docker
5
- env:
6
- global:
7
- - PATH=/opt/local/bin:$PATH
8
- - TESTOPTS="-v"
9
- - TINYTDS_UNIT_HOST=localhost
10
- rvm:
11
- - 2.1.9
12
- - 2.2.5
13
- - 2.3.1
14
- before_install:
15
- - docker info
16
- - sudo ./test/bin/install-openssl.sh
17
- - sudo ./test/bin/install-freetds.sh
18
- - sudo ./test/bin/setup.sh
19
- install:
20
- - gem install bundler
21
- - bundle --version
22
- - bundle install
23
- script:
24
- - bundle exec rake
data/BACKERS.md DELETED
@@ -1,32 +0,0 @@
1
- # Backers
2
-
3
- You can join in supporting TinyTDS and the Rails SQL Server Adapter development by [pledging on Patreon](https://www.patreon.com/metaskills)! Backers in the same pledge level appear in the order of pledge date.
4
-
5
- ### $2000
6
-
7
- [It could be you!](https://www.patreon.com/bePatron?c=765225&rid=1611218)
8
-
9
-
10
- ### $500
11
-
12
- [It could be you!](https://www.patreon.com/bePatron?c=765225&rid=1611209)
13
-
14
-
15
- ### $250
16
-
17
- [It could be you!](https://www.patreon.com/bePatron?c=765225&rid=1611199)
18
-
19
-
20
- ### $100
21
-
22
- [It could be you!](https://www.patreon.com/bePatron?c=765225&rid=1611196)
23
-
24
-
25
- ### $50+
26
-
27
- [It could be you!](https://www.patreon.com/bePatron?c=765225&rid=1611186)
28
-
29
-
30
- ### $10+
31
-
32
- [It could be you!](https://www.patreon.com/bePatron?c=765225&rid=1611149)
data/appveyor.yml DELETED
@@ -1,51 +0,0 @@
1
- init:
2
- - SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
3
- - SET PATH=C:\MinGW\msys\1.0\bin;%PATH%
4
- - SET RAKEOPT=-rdevkit
5
- - SET TESTOPTS='-v'
6
- - SET MAKE=make V=1
7
- clone_depth: 5
8
- skip_tags: true
9
- skip_branch_with_pr: true
10
- matrix:
11
- fast_finish: true
12
- install:
13
- # Output debugging info
14
- - ps: Update-AppveyorBuild -Version "$(Get-Content $env:appveyor_build_folder\VERSION).$env:appveyor_build_number"
15
- - perl --version
16
- - ruby --version
17
- - gem --version
18
-
19
- # Set up project prerequisits
20
- - bundle install
21
- - bundle exec rake ports
22
- build: off
23
- branches:
24
- except:
25
- - /dev.*/
26
- test_script:
27
- - timeout /t 4 /nobreak > NUL
28
- - powershell -File "%APPVEYOR_BUILD_FOLDER%\test\appveyor\dbsetup.ps1"
29
- - timeout /t 4 /nobreak > NUL
30
- - ps: Start-Service 'MSSQL$SQL2014'
31
- - timeout /t 4 /nobreak > NUL
32
- - sqlcmd -S ".\SQL2014" -U sa -P Password12! -i %APPVEYOR_BUILD_FOLDER%\test\appveyor\dbsetup.sql
33
- - bundle exec rake ports build test TINYTDS_UNIT_HOST_TEST=localhost TINYTDS_UNIT_DATASERVER="localhost\SQL2014" TINYTDS_SCHEMA=sqlserver_2014 TDSVER=7.1
34
- - bundle exec rake ports build test TINYTDS_UNIT_HOST_TEST=localhost TINYTDS_UNIT_DATASERVER="localhost\SQL2014" TINYTDS_SCHEMA=sqlserver_2014
35
- - ps: Stop-Service 'MSSQL$SQL2014'
36
- - ps: Start-Service 'MSSQL$SQL2012SP1'
37
- - timeout /t 4 /nobreak > NUL
38
- - sqlcmd -S ".\SQL2012SP1" -U sa -P Password12! -i %APPVEYOR_BUILD_FOLDER%\test\appveyor\dbsetup.sql
39
- - bundle exec rake ports build test TINYTDS_UNIT_HOST_TEST=localhost TINYTDS_UNIT_DATASERVER="localhost\SQL2012SP1" TINYTDS_SCHEMA=sqlserver_2014
40
- environment:
41
- CI_AZURE_HOST:
42
- secure: 8ydpYysZYKEBKvp6plKlYfepH98/zAuT27FFCaJ9Sss=
43
- TINYTDS_UNIT_AZURE_PASS:
44
- secure: fYKSKV4v+36OFQp2nZdX4DfUpgmy5cm0wuR73cgdmEk=
45
- matrix:
46
- - ruby_version: "24-x64"
47
- - ruby_version: "24"
48
- - ruby_version: "22-x64"
49
- - ruby_version: "22"
50
- on_failure:
51
- - find -name compile.log | xargs cat
@@ -1,37 +0,0 @@
1
- require_relative './recipe'
2
-
3
- module Ports
4
- class Freetds < Recipe
5
- def initialize(version)
6
- super('freetds', version)
7
-
8
- set_patches
9
- end
10
-
11
- private
12
-
13
- def configure_defaults
14
- opts = super
15
-
16
- opts << '--with-pic'
17
- opts << '--disable-odbc'
18
-
19
- if version =~ /0\.91/
20
- opts << '--with-tdsver=7.1'
21
- else
22
- opts << '--with-tdsver=7.3'
23
- end
24
-
25
- if windows?
26
- opts << '--sysconfdir=C:/Sites'
27
- opts << '--enable-sspi'
28
- end
29
-
30
- opts
31
- end
32
-
33
- def set_patches
34
- self.patch_files.concat get_patches(name, version)
35
- end
36
- end
37
- end
@@ -1,43 +0,0 @@
1
- require_relative './recipe'
2
-
3
- module Ports
4
- class Libiconv < Recipe
5
- def initialize(version)
6
- super('libiconv', version)
7
-
8
- set_patches
9
- end
10
-
11
- def cook
12
- chdir_for_build do
13
- super
14
- end
15
- self
16
- end
17
-
18
- private
19
-
20
- # When using rake-compiler-dock on Windows, the underlying Virtualbox shared
21
- # folders don't support symlinks, but libiconv expects it for a build on
22
- # Linux. We work around this limitation by using the temp dir for cooking.
23
- def chdir_for_build
24
- build_dir = ENV['RCD_HOST_RUBY_PLATFORM'].to_s =~ /mingw|mswin|cygwin/ ? '/tmp' : '.'
25
- Dir.chdir(build_dir) do
26
- yield
27
- end
28
- end
29
-
30
- def configure_defaults
31
- [
32
- "--host=#{@host}",
33
- '--disable-static',
34
- '--enable-shared',
35
- 'CFLAGS=-fPIC -O2'
36
- ]
37
- end
38
-
39
- def set_patches
40
- self.patch_files.concat get_patches(name, version)
41
- end
42
- end
43
- end
@@ -1,78 +0,0 @@
1
- require_relative './recipe'
2
-
3
- module Ports
4
- class Openssl < Recipe
5
- def initialize(version)
6
- super('openssl', version)
7
-
8
- set_patches
9
- end
10
-
11
- def configure
12
- return if configured?
13
-
14
- md5_file = File.join(tmp_path, 'configure.md5')
15
- digest = Digest::MD5.hexdigest(computed_options.to_s)
16
- File.open(md5_file, "w") { |f| f.write digest }
17
-
18
- # Windows doesn't recognize the shebang so always explicitly use sh
19
- execute('configure', "sh -c \"./Configure #{computed_options.join(' ')}\"")
20
- end
21
-
22
- def install
23
- unless installed?
24
- execute('install', %Q(#{make_cmd} install_sw install_ssldirs))
25
- end
26
- end
27
-
28
- private
29
-
30
- def execute(action, command, options={})
31
- # OpenSSL Requires Perl >= 5.10, while the Ruby devkit uses MSYS1 with Perl 5.8.8.
32
- # To overcome this, prepend Git's usr/bin to the PATH.
33
- # It has MSYS2 with a recent version of perl.
34
- prev_path = ENV['PATH']
35
- if host =~ /mingw/ && IO.popen(["perl", "-e", "print($])"], &:read).to_f < 5.010
36
- git_perl = 'C:/Program Files/Git/usr/bin'
37
- if File.directory?(git_perl)
38
- ENV['PATH'] = "#{git_perl}#{File::PATH_SEPARATOR}#{ENV['PATH']}"
39
- ENV['PERL'] = 'perl'
40
- end
41
- end
42
-
43
- super
44
- ENV['PATH'] = prev_path
45
- end
46
-
47
- def configure_defaults
48
- opts = [
49
- 'shared',
50
- target_arch
51
- ]
52
-
53
- if cross_build?
54
- opts << "--cross-compile-prefix=#{host}-"
55
- end
56
-
57
- opts
58
- end
59
-
60
- def target_arch
61
- if windows?
62
- arch = ''
63
- arch = '64' if host=~ /x86_64/
64
-
65
- "mingw#{arch}"
66
- else
67
- arch = 'x32'
68
- arch = 'x86_64' if host=~ /x86_64/
69
-
70
- "linux-#{arch}"
71
- end
72
- end
73
-
74
- def set_patches
75
- self.patch_files.concat get_patches(name, version)
76
- end
77
- end
78
- end
@@ -1,52 +0,0 @@
1
- # encoding: UTF-8
2
- require 'mini_portile2'
3
- require 'fileutils'
4
- require 'rbconfig'
5
-
6
- module Ports
7
- class Recipe < MiniPortile
8
- def cook
9
- checkpoint = "ports/#{name}-#{version}-#{host}.installed"
10
-
11
- unless File.exist? checkpoint
12
- super
13
- FileUtils.touch checkpoint
14
- end
15
- end
16
-
17
- private
18
-
19
- def configure_defaults
20
- [
21
- "--host=#{@host}",
22
- '--disable-static',
23
- '--enable-shared'
24
- ]
25
- end
26
-
27
- def windows?
28
- host =~ /mswin|mingw32/
29
- end
30
-
31
- def system_host
32
- RbConfig::CONFIG['host']
33
- end
34
-
35
- def cross_build?
36
- host != system_host
37
- end
38
-
39
- def get_patches(libname, version)
40
- patches = []
41
-
42
- patch_path = File.expand_path(
43
- File.join('..','..','..','patches',libname,version),
44
- __FILE__
45
- )
46
-
47
- patches.concat(Dir[File.join(patch_path, '*.patch')].sort)
48
- patches.concat(Dir[File.join(patch_path, '*.diff')].sort)
49
- end
50
- end
51
- end
52
-
@@ -1,27 +0,0 @@
1
-
2
- Write-Output "Setting up..."
3
- [reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo") | Out-Null
4
- [reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.SqlWmiManagement") | Out-Null
5
-
6
- Write-Output "Setting variables..."
7
- $serverName = $env:COMPUTERNAME
8
- $instances = @('SQL2012SP1', 'SQL2014', 'SQL2016')
9
- $smo = 'Microsoft.SqlServer.Management.Smo.'
10
- $wmi = new-object ($smo + 'Wmi.ManagedComputer')
11
-
12
- Write-Output "Configure Instances..."
13
- foreach ($instance in $instances) {
14
- Write-Output "Instance $instance ..."
15
- Write-Output "Enable TCP/IP and port 1433..."
16
- $uri = "ManagedComputer[@Name='$serverName']/ServerInstance[@Name='$instance']/ServerProtocol[@Name='Tcp']"
17
- $tcp = $wmi.GetSmoObject($uri)
18
- $tcp.IsEnabled = $true
19
- foreach ($ipAddress in $Tcp.IPAddresses) {
20
- $ipAddress.IPAddressProperties["TcpDynamicPorts"].Value = ""
21
- $ipAddress.IPAddressProperties["TcpPort"].Value = "1433"
22
- }
23
- $tcp.Alter()
24
- }
25
-
26
- Set-Service SQLBrowser -StartupType Manual
27
- Start-Service SQLBrowser
@@ -1,9 +0,0 @@
1
- CREATE DATABASE [tinytdstest];
2
- GO
3
- CREATE LOGIN [tinytds] WITH PASSWORD = '', CHECK_POLICY = OFF, DEFAULT_DATABASE = [tinytdstest];
4
- GO
5
- USE [tinytdstest];
6
- CREATE USER [tinytds] FOR LOGIN [tinytds];
7
- GO
8
- EXEC sp_addrolemember N'db_owner', N'tinytds';
9
- GO