occams-record 1.1.3 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b3fb7ced8f877916cfaea950deed2cb24381cf8f34a8af4b15e11a17c7827e5d
4
- data.tar.gz: c63a11949ac704ebaf48ec98880ad8fb26aeec0024d63bd83fbb3d94e00e6634
3
+ metadata.gz: 4c5eba9d662af4ceea78d6d50d9649dc88faebb18ab8f2d9e0704f4fe5367985
4
+ data.tar.gz: cd5aa76eeb6a5f89ed65bd10549e468173dc2f8aa896346925b4b3752cf7858e
5
5
  SHA512:
6
- metadata.gz: e69251d02c9361741ee39fbaaa05c037c9a37b6182b4fdc87a1e376f585a9810848da5982e913ae63fc557ef68e33dbdabd3b1c63a9d411340610b4d649c5e29
7
- data.tar.gz: 6def010edc18851479f0f82184c91e4c595bdbd906e82c640b2e8752622b6e1904c063acbf79f438f23f1575acb6c1dffb211da46bfbc4486710e1ad52c1e326
6
+ metadata.gz: d48d4389624f627302877ca6bcda1e7b1dc19facd4b54b4d255bb11b75d1f79149c1e79aff271b715eca0f43e03819e5aaaebc2897a7b0b29696eb20e0bcc4fc
7
+ data.tar.gz: ab8fdfddb10f751aa74274efc6229e5c24d32ec968fe8c88f30fd9af760652d9a75a2cc2bc17c29e3afcdd41b2d6f78e7cda60d485b6844458267beda2839aa2
@@ -7,9 +7,8 @@ module OccamsRecord
7
7
  # Load records in batches of N and yield each record to a block if given. If no block is given,
8
8
  # returns an Enumerator.
9
9
  #
10
- # NOTE Unlike ActiveRecord's find_each, ORDER BY is respected. The primary key will be appended
11
- # to the ORDER BY clause to help ensure consistent batches. Additionally, it will be run inside
12
- # of a transaction.
10
+ # NOTE Unlike ActiveRecord's find_each, ORDER BY is respected. It will be run inside
11
+ # of a transaction to ensure batch integrity.
13
12
  #
14
13
  # @param batch_size [Integer]
15
14
  # @param use_transaction [Boolean] Ensure it runs inside of a database transaction
@@ -84,7 +83,7 @@ module OccamsRecord
84
83
 
85
84
  until out_of_records
86
85
  l = limit && batch_size > limit - count ? limit - count : batch_size
87
- q = scope.order(model.primary_key.to_sym).offset(offset).limit(l)
86
+ q = scope.offset(offset).limit(l)
88
87
  results = Query.new(q, use: @use, query_logger: @query_logger, eager_loaders: @eager_loaders).run
89
88
 
90
89
  y.yield results if results.any?
@@ -3,5 +3,5 @@
3
3
  #
4
4
  module OccamsRecord
5
5
  # Library version
6
- VERSION = "1.1.3".freeze
6
+ VERSION = "1.1.4".freeze
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: occams-record
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordan Hollinger