tapsoob 0.3.24-java → 0.3.25-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tapsoob/data_stream.rb +8 -2
- data/lib/tapsoob/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d124a866776acf86f71e3158dadd3e81f2030f858caa81e82999a3dc3cad82f4
|
4
|
+
data.tar.gz: d68c1125793da5e9d0862345148a9b4e8b7d874517d79a46cb39752b092af0f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60a875dc77e9476993b60b64d2596bd659dd7e61b791349914c6eafbc843d9b2ad06e08c77c9345c1e3101ba9d2ef166acb479e31e595c7bca4ef35d7617dc5c
|
7
|
+
data.tar.gz: ffa787880d5db54be32f66c42f5daccc08d0dccb4542606d0ed37bf484194c914e81169f958501299acc6c377fe055a505ba5f5b81c8c9295697c88e18eb4d13
|
data/lib/tapsoob/data_stream.rb
CHANGED
@@ -219,6 +219,9 @@ module Tapsoob
|
|
219
219
|
end
|
220
220
|
|
221
221
|
def import_rows(rows)
|
222
|
+
columns = rows[:header]
|
223
|
+
data = rows[:data]
|
224
|
+
|
222
225
|
# Decode blobs
|
223
226
|
if rows.has_key?(:types) && rows[:types].include?("blob")
|
224
227
|
blob_indices = rows[:types].each_index.select { |idx| rows[:types][idx] == "blob" }
|
@@ -230,9 +233,12 @@ module Tapsoob
|
|
230
233
|
end
|
231
234
|
|
232
235
|
# Remove id column
|
233
|
-
|
236
|
+
if @options[:"discard-identity"]
|
237
|
+
columns = rows[:header] - ["id"]
|
238
|
+
data = data.map { |d| d[1..-1] }
|
239
|
+
end
|
234
240
|
|
235
|
-
table.import(columns,
|
241
|
+
table.import(columns, data, :commit_every => 100)
|
236
242
|
state[:offset] += rows[:data].size
|
237
243
|
rescue Exception => ex
|
238
244
|
case ex.message
|
data/lib/tapsoob/version.rb
CHANGED