tapsoob 0.5.5-java → 0.5.10-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: 83850f8a3bb697fb14249fa99bf646506160bccc88ad86c0472d3e52f7efe6f6
4
- data.tar.gz: f1a44850326cd27d2ccec65af654bbe5ddac608e608189bcf7e29775b9c9435e
3
+ metadata.gz: 4742e33589f57660f7b747d99108441d0326a22c5a395f9b94d5774477c68cca
4
+ data.tar.gz: 88479c54f89eb1ed9456d8fa767d8de445e89ba04b37ffe18d0285b48c437a9e
5
5
  SHA512:
6
- metadata.gz: '03048eb32c52df9e0bacc9fea8bbe91156262fb8155667fdbc94865e6cde8078c4061afab336cf1d3a5ef17cfe6ed83f055b48af919120ccb1536ec5f3828ab7'
7
- data.tar.gz: 25b4903ba64589ca1e6ace90787f9716a8223486349a4d8cc6e85954509aa492a90b0984ebcb8d3afcaf18aa0fb9c33fc5292d604908fbdac3640708feae4b0c
6
+ metadata.gz: ecf33bcd63931ccc04966b27423acaa7f18da3ef7931c4d21da518d7bc8d7ca5e49e27f501f3b6f2671fb6f99c7f4f22472328e0fd920c2030a23619e04874e4
7
+ data.tar.gz: 80b5de273251dcd40987b87f549aa17a20a6b2d8d4b106209a3d5ca0d4816c23017e83879816655a26f69d3a19702252a2b1526edcff986ed7f166d38d2c0239
@@ -72,7 +72,7 @@ module Tapsoob
72
72
  # keep a record of the average chunksize within the first few hundred thousand records, after chunksize
73
73
  # goes below 100 or maybe if offset is > 1000
74
74
  def fetch_rows
75
- state[:chunksize] = fetch_chunksize
75
+ #state[:chunksize] = fetch_chunksize
76
76
  ds = table.order(*order_by).limit(state[:chunksize], state[:offset])
77
77
  state[:size] = table.count
78
78
  log.debug "DataStream#fetch_rows SQL -> #{ds.sql}"
@@ -86,7 +86,7 @@ module Tapsoob
86
86
  end
87
87
 
88
88
  def fetch_file(dump_path)
89
- state[:chunksize] = fetch_chunksize
89
+ #state[:chunksize] = fetch_chunksize
90
90
  ds = JSON.parse(File.read(File.join(dump_path, "data", "#{table_name}.json")))
91
91
  state[:size] = ds["data"].size
92
92
  log.debug "DataStream#fetch_file"
@@ -104,13 +104,13 @@ module Tapsoob
104
104
  20
105
105
  end
106
106
 
107
- def fetch_chunksize
108
- chunksize = state[:chunksize]
109
- return chunksize if state[:num_chunksize] < max_chunksize_training
110
- return chunksize if state[:avg_chunksize] == 0
111
- return chunksize if state[:error]
112
- state[:avg_chunksize] > chunksize ? state[:avg_chunksize] : chunksize
113
- end
107
+ #def fetch_chunksize
108
+ # chunksize = state[:chunksize]
109
+ # return chunksize if state[:num_chunksize] < max_chunksize_training
110
+ # return chunksize if state[:avg_chunksize] == 0
111
+ # return chunksize if state[:error]
112
+ # state[:avg_chunksize] > chunksize ? state[:avg_chunksize] : chunksize
113
+ #end
114
114
 
115
115
  def update_chunksize_stats
116
116
  return if state[:num_chunksize] >= max_chunksize_training
@@ -15,13 +15,13 @@ module Tapsoob
15
15
  template = ERB.new <<-END_MIG
16
16
  Class.new(Sequel::Migration) do
17
17
  def up
18
- <% db.tables.each do |table| %>
18
+ <% db.send(:sort_dumped_tables, db.tables, {}).each do |table| %>
19
19
  <%= db.dump_table_schema(table, indexes: false) %>
20
20
  <% end %>
21
21
  end
22
22
 
23
23
  def down
24
- <% db.tables.each do |table| %>
24
+ <% db.send(:sort_dumped_tables, db.tables, {}).reverse.each do |table| %>
25
25
  drop_table("<%= table %>", if_exists: true)
26
26
  <% end %>
27
27
  end
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Tapsoob
3
- VERSION = "0.5.5".freeze
3
+ VERSION = "0.5.10".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.5.5
4
+ version: 0.5.10
5
5
  platform: java
6
6
  authors:
7
7
  - Félix Bellanger
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-04-20 00:00:00.000000000 Z
12
+ date: 2022-04-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  requirement: !ruby/object:Gem::Requirement
@@ -149,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
149
  - !ruby/object:Gem::Version
150
150
  version: '0'
151
151
  requirements: []
152
- rubygems_version: 3.1.6
152
+ rubygems_version: 3.2.29
153
153
  signing_key:
154
154
  specification_version: 4
155
155
  summary: Simple tool to import/export databases.