vertica 0.10.4 → 0.10.5
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.
- data/VERSION +1 -1
- data/lib/vertica/connection.rb +2 -1
- data/test/functional/query_test.rb +10 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.10.
|
1
|
+
0.10.5
|
data/lib/vertica/connection.rb
CHANGED
@@ -214,7 +214,8 @@ class Vertica::Connection
|
|
214
214
|
end
|
215
215
|
|
216
216
|
def write_bytes(bytes)
|
217
|
-
socket.write_nonblock
|
217
|
+
bytes_written = socket.write_nonblock(bytes)
|
218
|
+
write_bytes(bytes[bytes_written...bytes.size]) if bytes_written < bytes.size
|
218
219
|
rescue IO::WaitReadable, IO::WaitWritable => wait_error
|
219
220
|
io_select(wait_error)
|
220
221
|
retry
|
@@ -128,6 +128,15 @@ class QueryTest < Test::Unit::TestCase
|
|
128
128
|
@connection.query("BLAH")
|
129
129
|
end
|
130
130
|
end
|
131
|
+
|
132
|
+
def test_copy_in_alot_of_data_with_customer_handler
|
133
|
+
@connection.copy "COPY test_ruby_vertica_table FROM STDIN" do |data|
|
134
|
+
data.write "11|#{"a" * 1_000_000}\n"
|
135
|
+
end
|
136
|
+
|
137
|
+
result = @connection.query("SELECT id FROM test_ruby_vertica_table ORDER BY id", :row_style => :array)
|
138
|
+
assert_equal 2, result.length
|
139
|
+
end
|
131
140
|
|
132
141
|
def test_copy_in_with_customer_handler
|
133
142
|
@connection.copy "COPY test_ruby_vertica_table FROM STDIN" do |data|
|
@@ -159,7 +168,7 @@ class QueryTest < Test::Unit::TestCase
|
|
159
168
|
assert_equal 4, result.length
|
160
169
|
assert_equal [[1, "matt"], [11, "Stuff"], [12, "More stuff"], [13, "Final stuff"]], result.rows
|
161
170
|
end
|
162
|
-
|
171
|
+
|
163
172
|
def test_copy_in_with_io
|
164
173
|
io = StringIO.new("11|Stuff\r\n12|More stuff\n13|Final stuff\n")
|
165
174
|
@connection.copy "COPY test_ruby_vertica_table FROM STDIN", io
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vertica
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2013-08-
|
14
|
+
date: 2013-08-09 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rake
|