do_sqlserver-tinytds 0.10.17.alpha

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +7 -0
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/.gitignore +3 -0
  5. data/.rspec +2 -0
  6. data/CONNECTING.markdown +40 -0
  7. data/ChangeLog.markdown +56 -0
  8. data/FAQS.markdown +8 -0
  9. data/Gemfile +3 -0
  10. data/Gemfile.lock +30 -0
  11. data/INSTALL.markdown +76 -0
  12. data/LICENSE +21 -0
  13. data/README.md +95 -0
  14. data/Rakefile +7 -0
  15. data/buildfile +27 -0
  16. data/do_sqlserver_tinytds.gemspec +31 -0
  17. data/lib/do_sqlserver.rb +1 -0
  18. data/lib/do_sqlserver_tinytds.rb +360 -0
  19. data/lib/do_sqlserver_tinytds/addressable_extension.rb +69 -0
  20. data/lib/do_sqlserver_tinytds/tiny_tds_extension.rb +123 -0
  21. data/lib/do_sqlserver_tinytds/transaction.rb +36 -0
  22. data/lib/do_sqlserver_tinytds/version.rb +5 -0
  23. data/spec/command_spec.rb +9 -0
  24. data/spec/connection_spec.rb +21 -0
  25. data/spec/encoding_spec.rb +8 -0
  26. data/spec/reader_spec.rb +8 -0
  27. data/spec/result_spec.rb +16 -0
  28. data/spec/spec_helper.rb +155 -0
  29. data/spec/typecast/array_spec.rb +8 -0
  30. data/spec/typecast/bigdecimal_spec.rb +9 -0
  31. data/spec/typecast/boolean_spec.rb +9 -0
  32. data/spec/typecast/byte_array_spec.rb +31 -0
  33. data/spec/typecast/class_spec.rb +8 -0
  34. data/spec/typecast/date_spec.rb +11 -0
  35. data/spec/typecast/datetime_spec.rb +9 -0
  36. data/spec/typecast/float_spec.rb +9 -0
  37. data/spec/typecast/integer_spec.rb +8 -0
  38. data/spec/typecast/nil_spec.rb +10 -0
  39. data/spec/typecast/other_spec.rb +8 -0
  40. data/spec/typecast/range_spec.rb +8 -0
  41. data/spec/typecast/string_spec.rb +8 -0
  42. data/spec/typecast/time_spec.rb +8 -0
  43. metadata +169 -0
  44. metadata.gz.sig +3 -0
@@ -0,0 +1,8 @@
1
+ # encoding: utf-8
2
+
3
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
4
+ require 'data_objects/spec/shared/typecast/array_spec'
5
+
6
+ describe 'DataObjects::SqlServer with Array' do
7
+ it_should_behave_like 'supporting Array'
8
+ end
@@ -0,0 +1,9 @@
1
+ # encoding: utf-8
2
+
3
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
4
+ require 'data_objects/spec/shared/typecast/bigdecimal_spec'
5
+
6
+ describe 'DataObjects::SqlServer with BigDecimal' do
7
+ it_should_behave_like 'supporting BigDecimal'
8
+ it_should_behave_like 'supporting BigDecimal autocasting'
9
+ end
@@ -0,0 +1,9 @@
1
+ # encoding: utf-8
2
+
3
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
4
+ require 'data_objects/spec/shared/typecast/boolean_spec'
5
+
6
+ describe 'DataObjects::SqlServer with Boolean' do
7
+ it_should_behave_like 'supporting Boolean'
8
+ it_should_behave_like 'supporting Boolean autocasting'
9
+ end
@@ -0,0 +1,31 @@
1
+ # encoding: utf-8
2
+
3
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
4
+ require 'data_objects/spec/shared/typecast/byte_array_spec'
5
+
6
+ describe 'DataObjects::SqlServer with ByteArray' do
7
+ # it_should_behave_like 'supporting ByteArray'
8
+ #
9
+ # ByteArray is not yet supported on JRuby:
10
+ #
11
+ # Like Postgres, SQL Server doesn't typecast bytea type to integer, decimal,
12
+ # etc. In other words,
13
+ # @connection.create_command("SELECT id FROM widgets WHERE id = ?").execute_reader(::Extlib::ByteArray.new("2"))
14
+ # results in the equivalent to the following query being executed:
15
+ # SELECT id FROM widgets WHERE id = 0x32
16
+ # BUT 0x32 as a parameter = (decimal) 50
17
+ # NOT the ASCII char for '2'.
18
+ #
19
+ # Other drivers (Postgres) override #setPreparedStatementParam in their
20
+ # DriverDefinition implementations and use ps.getParameterMetadata() to let
21
+ # the JDBC driver handle the casting.
22
+ #
23
+ # Unfortunately, we can't rely on ps.getParameterMetadata() because of the
24
+ # following bug in jTDS:
25
+ # https://sourceforge.net/tracker/?func=detail&aid=2220192&group_id=33291&atid=407762
26
+ # getParameterClassName(idx) => java.lang.Object
27
+ # getParameterTypeName(idx) => null
28
+ # getParameterType(idx) => 0 (NULL)
29
+ #
30
+ # Without this information we don't know what we should be casting to!
31
+ end
@@ -0,0 +1,8 @@
1
+ # encoding: utf-8
2
+
3
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
4
+ require 'data_objects/spec/shared/typecast/class_spec'
5
+
6
+ describe 'DataObjects::SqlServer with Class' do
7
+ it_should_behave_like 'supporting Class'
8
+ end
@@ -0,0 +1,11 @@
1
+ # encoding: utf-8
2
+
3
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
4
+ require 'data_objects/spec/shared/typecast/date_spec'
5
+
6
+ describe 'DataObjects::SqlServer with Date' do
7
+ it_should_behave_like 'supporting Date'
8
+
9
+ #SqlServer will cast DATE type to Time
10
+ it_should_behave_like 'supporting Date autocasting'
11
+ end
@@ -0,0 +1,9 @@
1
+ # encoding: utf-8
2
+
3
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
4
+ require 'data_objects/spec/shared/typecast/datetime_spec'
5
+
6
+ describe 'DataObjects::SqlServer with DateTime' do
7
+ it_should_behave_like 'supporting DateTime'
8
+ it_should_behave_like 'supporting DateTime autocasting'
9
+ end
@@ -0,0 +1,9 @@
1
+ # encoding: utf-8
2
+
3
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
4
+ require 'data_objects/spec/shared/typecast/float_spec'
5
+
6
+ describe 'DataObjects::SqlServer with Float' do
7
+ it_should_behave_like 'supporting Float'
8
+ it_should_behave_like 'supporting Float autocasting'
9
+ end
@@ -0,0 +1,8 @@
1
+ # encoding: utf-8
2
+
3
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
4
+ require 'data_objects/spec/shared/typecast/integer_spec'
5
+
6
+ describe 'DataObjects::SqlServer with Integer' do
7
+ it_should_behave_like 'supporting Integer'
8
+ end
@@ -0,0 +1,10 @@
1
+ # encoding: utf-8
2
+
3
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
4
+ require 'data_objects/spec/shared/typecast/nil_spec'
5
+
6
+ describe 'DataObjects::SqlServer with Nil' do
7
+ it_should_behave_like 'supporting Nil'
8
+ it_should_behave_like 'supporting writing an Nil'
9
+ it_should_behave_like 'supporting Nil autocasting'
10
+ end
@@ -0,0 +1,8 @@
1
+ # encoding: utf-8
2
+
3
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
4
+ require 'data_objects/spec/shared/typecast/other_spec'
5
+
6
+ describe 'DataObjects::H2 with other (unknown) type' do
7
+ it_should_behave_like 'supporting other (unknown) type'
8
+ end
@@ -0,0 +1,8 @@
1
+ # encoding: utf-8
2
+
3
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
4
+ require 'data_objects/spec/shared/typecast/range_spec'
5
+
6
+ describe 'DataObjects::SqlServer with Range' do
7
+ it_should_behave_like 'supporting Range'
8
+ end
@@ -0,0 +1,8 @@
1
+ # encoding: utf-8
2
+
3
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
4
+ require 'data_objects/spec/shared/typecast/string_spec'
5
+
6
+ describe 'DataObjects::SqlServer with String' do
7
+ it_should_behave_like 'supporting String'
8
+ end
@@ -0,0 +1,8 @@
1
+ # encoding: utf-8
2
+
3
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
4
+ require 'data_objects/spec/shared/typecast/time_spec'
5
+
6
+ describe 'DataObjects::SqlServer with Time' do
7
+ it_should_behave_like 'supporting Time'
8
+ end
metadata ADDED
@@ -0,0 +1,169 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: do_sqlserver-tinytds
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.10.17.alpha
5
+ platform: ruby
6
+ authors:
7
+ - Juan Leal
8
+ - Caleb Tutty
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain:
12
+ - |
13
+ -----BEGIN CERTIFICATE-----
14
+ MIIDojCCAoqgAwIBAgIBATANBgkqhkiG9w0BAQUFADBUMQ4wDAYDVQQDDAVjYWxl
15
+ YjEaMBgGCgmSJomT8ixkARkWCnByZXR0eW1pbnQxEjAQBgoJkiaJk/IsZAEZFgJj
16
+ bzESMBAGCgmSJomT8ixkARkWAm56MB4XDTEzMDYwMzAyMjAwOFoXDTE0MDYwMzAy
17
+ MjAwOFowVDEOMAwGA1UEAwwFY2FsZWIxGjAYBgoJkiaJk/IsZAEZFgpwcmV0dHlt
18
+ aW50MRIwEAYKCZImiZPyLGQBGRYCY28xEjAQBgoJkiaJk/IsZAEZFgJuejCCASIw
19
+ DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM42TB3acxhrm86cpycILt/9WO/A
20
+ dctXRFqYUUhSVo9yN5r9GvqI140lSfjLI41kbpRan75btyFugQF2FjQQIx+T5Whu
21
+ WtIbGoW0xCjkpg0GM/Rw68s3vRoZkRckA1T4vLuu8ei8EKJwmvWXuxXH8n5EfgNh
22
+ 3Y469wyvc5FkXo6BodfVRHmpGLPOg1UlGnqCuVCkVlVMDhfQyIClPRcloutWgd+J
23
+ v7iCPo7yCK19h3KVOZuLJyvGMiwAKDR1il3be+AklSoV1lcLceKQ62jLY2/h9Io4
24
+ P6UASO/bhc512+NZyKT8w2ZmJuzR/OhiEQZt2gi/mgQ+ddTBXZjeA0abq18CAwEA
25
+ AaN/MH0wCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFIuzP3TgPyny
26
+ RcBzYsR1zF/xD5LuMCEGA1UdEQQaMBiBFmNhbGViQHByZXR0eW1pbnQuY28ubnow
27
+ IQYDVR0SBBowGIEWY2FsZWJAcHJldHR5bWludC5jby5uejANBgkqhkiG9w0BAQUF
28
+ AAOCAQEAN0OmLioYBWHfhE5D0LCqZWapfiOLdVk0CmPpuNHPUdKmdDeVP0vjFyIM
29
+ SF9v4pCEoTK2hk56XM3ev/RlGHEPYzyjctbsulK7V9+1745mwBkU6SwbALCgmnLx
30
+ D0SFZI/FrT922mWXGvfg0hd7RGvRcgDxCTGn/rgoD73LhK6fFM88OOhcrTozeKxa
31
+ 0mh5ZqYRNQWKy6UgE8nxWo7UrRvjOkVIYqeJNdYaXv6fQQBFj4iR4SYfJx8xzh2E
32
+ /qqRTsuOOmPoaNtB4XnGMXyHOzOhAvurliPCtBFlkWAH0RvDt29O9ZcwRhInvr83
33
+ S4meqecZ62/XH48iGccggmMPiTi8zQ==
34
+ -----END CERTIFICATE-----
35
+ date: 2013-06-08 00:00:00.000000000 Z
36
+ dependencies:
37
+ - !ruby/object:Gem::Dependency
38
+ name: data_objects
39
+ requirement: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: 0.10.13
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: !ruby/object:Gem::Requirement
47
+ requirements:
48
+ - - ~>
49
+ - !ruby/object:Gem::Version
50
+ version: 0.10.13
51
+ - !ruby/object:Gem::Dependency
52
+ name: tiny_tds
53
+ requirement: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - ~>
56
+ - !ruby/object:Gem::Version
57
+ version: '0.5'
58
+ type: :runtime
59
+ prerelease: false
60
+ version_requirements: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ~>
63
+ - !ruby/object:Gem::Version
64
+ version: '0.5'
65
+ - !ruby/object:Gem::Dependency
66
+ name: rspec
67
+ requirement: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ~>
70
+ - !ruby/object:Gem::Version
71
+ version: '2.5'
72
+ type: :development
73
+ prerelease: false
74
+ version_requirements: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - ~>
77
+ - !ruby/object:Gem::Version
78
+ version: '2.5'
79
+ description: Implements the DataObjects API for Microsoft SQL Server using TinyTDS
80
+ email: sellingangle@hotmail.com caleb@prettymint.co.nz
81
+ executables: []
82
+ extensions: []
83
+ extra_rdoc_files: []
84
+ files:
85
+ - .gitignore
86
+ - .rspec
87
+ - CONNECTING.markdown
88
+ - ChangeLog.markdown
89
+ - FAQS.markdown
90
+ - Gemfile
91
+ - Gemfile.lock
92
+ - INSTALL.markdown
93
+ - LICENSE
94
+ - README.md
95
+ - Rakefile
96
+ - buildfile
97
+ - do_sqlserver_tinytds.gemspec
98
+ - lib/do_sqlserver.rb
99
+ - lib/do_sqlserver_tinytds.rb
100
+ - lib/do_sqlserver_tinytds/addressable_extension.rb
101
+ - lib/do_sqlserver_tinytds/tiny_tds_extension.rb
102
+ - lib/do_sqlserver_tinytds/transaction.rb
103
+ - lib/do_sqlserver_tinytds/version.rb
104
+ - spec/command_spec.rb
105
+ - spec/connection_spec.rb
106
+ - spec/encoding_spec.rb
107
+ - spec/reader_spec.rb
108
+ - spec/result_spec.rb
109
+ - spec/spec_helper.rb
110
+ - spec/typecast/array_spec.rb
111
+ - spec/typecast/bigdecimal_spec.rb
112
+ - spec/typecast/boolean_spec.rb
113
+ - spec/typecast/byte_array_spec.rb
114
+ - spec/typecast/class_spec.rb
115
+ - spec/typecast/date_spec.rb
116
+ - spec/typecast/datetime_spec.rb
117
+ - spec/typecast/float_spec.rb
118
+ - spec/typecast/integer_spec.rb
119
+ - spec/typecast/nil_spec.rb
120
+ - spec/typecast/other_spec.rb
121
+ - spec/typecast/range_spec.rb
122
+ - spec/typecast/string_spec.rb
123
+ - spec/typecast/time_spec.rb
124
+ homepage: ''
125
+ licenses:
126
+ - MIT
127
+ metadata: {}
128
+ post_install_message:
129
+ rdoc_options: []
130
+ require_paths:
131
+ - lib
132
+ required_ruby_version: !ruby/object:Gem::Requirement
133
+ requirements:
134
+ - - '>='
135
+ - !ruby/object:Gem::Version
136
+ version: '0'
137
+ required_rubygems_version: !ruby/object:Gem::Requirement
138
+ requirements:
139
+ - - '>'
140
+ - !ruby/object:Gem::Version
141
+ version: 1.3.1
142
+ requirements: []
143
+ rubyforge_project:
144
+ rubygems_version: 2.0.3
145
+ signing_key:
146
+ specification_version: 4
147
+ summary: DataObjects SQL Server Driver using TinyTDS
148
+ test_files:
149
+ - spec/command_spec.rb
150
+ - spec/connection_spec.rb
151
+ - spec/encoding_spec.rb
152
+ - spec/reader_spec.rb
153
+ - spec/result_spec.rb
154
+ - spec/spec_helper.rb
155
+ - spec/typecast/array_spec.rb
156
+ - spec/typecast/bigdecimal_spec.rb
157
+ - spec/typecast/boolean_spec.rb
158
+ - spec/typecast/byte_array_spec.rb
159
+ - spec/typecast/class_spec.rb
160
+ - spec/typecast/date_spec.rb
161
+ - spec/typecast/datetime_spec.rb
162
+ - spec/typecast/float_spec.rb
163
+ - spec/typecast/integer_spec.rb
164
+ - spec/typecast/nil_spec.rb
165
+ - spec/typecast/other_spec.rb
166
+ - spec/typecast/range_spec.rb
167
+ - spec/typecast/string_spec.rb
168
+ - spec/typecast/time_spec.rb
169
+ has_rdoc:
@@ -0,0 +1,3 @@
1
+  �A�y��V���8A���8ݹ�%�|By��%S|8�<�,�.x@����g�K��A�g���$w�W6�n�U�����KY**�;��D�
2
+ ���mg�� ` ��'|�˨429X��ҽ
3
+ �-�o:��4^�^iؚ1��$��S�߭�7h`K5k����%�o.gh�hi�ڌ�œ�����\�� �q�Zޫ�l������-y�$߽��6*��5V��O�e��D�|� �1q/��؉���Q�