jvertica 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jvertica/version.rb +1 -1
- data/lib/jvertica.rb +7 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de9c6674f79eaed12e230662901b1c579f472253
|
4
|
+
data.tar.gz: fcfe4c0b86cdab21e1373e89268543b61b4c1b0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f4a55033585367e0958b96b427be21f572f8481dc7b383bf8385a5975cb7ac881866c004cd77492646055dc344f6436b97f2351fcb3608864af4f39f65b91b9
|
7
|
+
data.tar.gz: 30c732927c8a6ce45c55059c93c2b6e5d16522ddd46f068f602d5a46c78ed288fefc1a5f1123a286d98253d1102038e6cd69bba5eb2f40437fd0daa292df1712
|
data/lib/jvertica/version.rb
CHANGED
data/lib/jvertica.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'java'
|
2
|
+
require 'thread'
|
2
3
|
require 'jvertica/version'
|
3
4
|
require 'jdbc-vertica'
|
4
5
|
require Jdbc::Vertica.driver_jar
|
@@ -122,15 +123,18 @@ class Jvertica
|
|
122
123
|
elsif block_given?
|
123
124
|
i, o = IO.pipe
|
124
125
|
begin
|
125
|
-
|
126
|
-
|
126
|
+
thread = Thread.new do
|
127
|
+
yield(o)
|
128
|
+
o.close
|
129
|
+
end
|
127
130
|
stream.addStream org.jruby.util.IOInputStream.new(i)
|
128
131
|
rescue => e
|
129
132
|
raise e
|
130
133
|
ensure
|
134
|
+
thread.join
|
131
135
|
end
|
132
|
-
|
133
136
|
end
|
137
|
+
|
134
138
|
rescue => e
|
135
139
|
r = stream.finish
|
136
140
|
raise e.class.new("[affected rows: #{r}] #{e.message}")
|