pgslice 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/exe/pgslice +1 -1
- data/lib/pgslice.rb +6 -7
- data/lib/pgslice/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d43d6ab9a3394ef28e8db635df3d871224b820b
|
4
|
+
data.tar.gz: 20b24a285377ebdd908e08d70d77a53c12e7a8b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e595c90abf4444c538c23b62fc52592f6095ceb5ddc715c6d537c87b337e1bd7663f794364d080edb9943041f98fd93cdadb434ce5976746ad01348225e48a8
|
7
|
+
data.tar.gz: 4e4081d488e8f024f0ce3f47f238657debb69b1418194ca0562814aa2825a0e9527848cab90c91b93d984a90692a0b56310e55a01578d38a738fcfb33f80513a
|
data/CHANGELOG.md
CHANGED
data/exe/pgslice
CHANGED
data/lib/pgslice.rb
CHANGED
@@ -243,20 +243,19 @@ CREATE OR REPLACE FUNCTION #{trigger_name}()
|
|
243
243
|
|
244
244
|
primary_key = self.primary_key(table)
|
245
245
|
max_source_id = max_id(source_table, primary_key)
|
246
|
+
|
246
247
|
max_dest_id =
|
247
|
-
if options[:
|
248
|
+
if options[:start]
|
249
|
+
options[:start]
|
250
|
+
elsif options[:swapped]
|
248
251
|
max_id(dest_table, primary_key, where: options[:where], below: max_source_id)
|
249
252
|
else
|
250
253
|
max_id(dest_table, primary_key, where: options[:where])
|
251
254
|
end
|
252
255
|
|
253
256
|
if max_dest_id == 0 && !options[:swapped]
|
254
|
-
|
255
|
-
|
256
|
-
else
|
257
|
-
min_source_id = min_id(source_table, primary_key, field, cast, starting_time, options[:where])
|
258
|
-
max_dest_id = min_source_id - 1 if min_source_id
|
259
|
-
end
|
257
|
+
min_source_id = min_id(source_table, primary_key, field, cast, starting_time, options[:where])
|
258
|
+
max_dest_id = min_source_id - 1 if min_source_id
|
260
259
|
end
|
261
260
|
|
262
261
|
starting_id = max_dest_id
|
data/lib/pgslice/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pgslice
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: slop
|