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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5f2ae263c3b94ba8a2d39cdcae3c4ed22462e8b0350a48b865300c5800988ac4
4
- data.tar.gz: ebb482c1449af92696f4ef1cfcaae8336c22d018a90cc3f1e9c0726820c79e3b
3
+ metadata.gz: d124a866776acf86f71e3158dadd3e81f2030f858caa81e82999a3dc3cad82f4
4
+ data.tar.gz: d68c1125793da5e9d0862345148a9b4e8b7d874517d79a46cb39752b092af0f8
5
5
  SHA512:
6
- metadata.gz: da3ff1a49face2aec964a6848c994decece8606c8b5681dd065bb4dbb9f7f456734511fb2791c383dc35500fb2aa59b7c262ccde288f28eb9783392723fdaf04
7
- data.tar.gz: fe0a13d721abbdf54145a6ce875334b96668edd505159395ad65043105e7a716f8feabe43c35bebc0ddcc5baf30a273b4d3431718346f56044f5dfbe83118fa4
6
+ metadata.gz: 60a875dc77e9476993b60b64d2596bd659dd7e61b791349914c6eafbc843d9b2ad06e08c77c9345c1e3101ba9d2ef166acb479e31e595c7bca4ef35d7617dc5c
7
+ data.tar.gz: ffa787880d5db54be32f66c42f5daccc08d0dccb4542606d0ed37bf484194c914e81169f958501299acc6c377fe055a505ba5f5b81c8c9295697c88e18eb4d13
@@ -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
- columns = ((@options[:"discard-identity"] && rows[:header].include?("id")) ? rows[:header] - ["id"] : rows[:header])
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, rows[:data], :commit_every => 100)
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
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Tapsoob
3
- VERSION = "0.3.24".freeze
3
+ VERSION = "0.3.25".freeze
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tapsoob
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.24
4
+ version: 0.3.25
5
5
  platform: java
6
6
  authors:
7
7
  - Félix Bellanger