occams-record 0.22.0 → 0.23.0
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 +4 -4
- data/lib/occams-record/query.rb +3 -3
- data/lib/occams-record/raw_query.rb +1 -0
- data/lib/occams-record/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0f92b611f104c0a5644c7caa0ca6aa57f7beffa381d3579490a475fb1c388d51
|
|
4
|
+
data.tar.gz: 2b399f8bbd15b0bfd1859533431432b5607a841448cb5d112e21f60090edb997
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 67fdf0377759ccb13e6d59abda9e87f4a30d4be4431f4e92cf16b0cd430bfcdc74afa05cd9d0c178a0b80cc3afbfcdae292db1f53fef0c6facbceda4f49a5223
|
|
7
|
+
data.tar.gz: 8d88fc8bdb242090bf0f0a833075733fb6b05a09441bd235e2e7eb02cac6dd3ef9a8463539d28edf531b3b17474b74b5d5cfdedf45df62f89212ac649bbc216f
|
data/lib/occams-record/query.rb
CHANGED
|
@@ -38,6 +38,7 @@ module OccamsRecord
|
|
|
38
38
|
|
|
39
39
|
include Batches
|
|
40
40
|
include EagerLoaders::Builder
|
|
41
|
+
include Enumerable
|
|
41
42
|
|
|
42
43
|
#
|
|
43
44
|
# Initialize a new query.
|
|
@@ -99,13 +100,12 @@ module OccamsRecord
|
|
|
99
100
|
end
|
|
100
101
|
|
|
101
102
|
#
|
|
102
|
-
# Run the query and return the first result (which could be nil)
|
|
103
|
+
# Run the query and return the first result (which could be nil) by using LIMIT 1.
|
|
103
104
|
#
|
|
104
105
|
# @return [OccamsRecord::Results::Row]
|
|
105
106
|
#
|
|
106
107
|
def first
|
|
107
|
-
|
|
108
|
-
run[0]
|
|
108
|
+
run { |q| q.limit 1 }.first
|
|
109
109
|
end
|
|
110
110
|
|
|
111
111
|
#
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: occams-record
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.23.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jordan Hollinger
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-04-
|
|
11
|
+
date: 2018-04-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|