restforce-query 0.1.1 → 0.1.2
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/Gemfile.lock +1 -1
- data/lib/restforce/query/version.rb +1 -1
- data/lib/restforce/query.rb +6 -7
- 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: 89dba9bae198cbe1532f97b46acb1b59fde9808bffdad2c943456213a1e78bf6
|
4
|
+
data.tar.gz: e188f010731e0019a6366535c596de7aeadefca82d5cd8cdb5908376f083685d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a10f3a27cfde112764f90dfc74081869d465ac8f23df6f3648799bdbc41f707d322a30acc36e3860c743dcaaee7b9ee7aa037f70ff7525096e2a1f671ad0b3c6
|
7
|
+
data.tar.gz: '0796c933f3ffc8c468db9e5ce74e3b28864bf7c784e937aac0f414ec62d219513c40274533f51dd244eaa14d0bd0c819847e832a0f8c440631ff2f81fe79bb22'
|
data/Gemfile.lock
CHANGED
data/lib/restforce/query.rb
CHANGED
@@ -8,9 +8,9 @@ module Restforce
|
|
8
8
|
# Chain calls to: select, where, distinct, from, group_by, limit or select_distinct to use it
|
9
9
|
class Query
|
10
10
|
include Enumerable
|
11
|
-
def initialize(query_builder = Builder.new)
|
11
|
+
def initialize(query_builder = Builder.new, restforce_client = Restforce.new)
|
12
12
|
@query_builder = query_builder
|
13
|
-
@
|
13
|
+
@restforce_client = restforce_client
|
14
14
|
end
|
15
15
|
|
16
16
|
%i[select select_distinct distinct where from group_by limit].each do |method_name|
|
@@ -28,14 +28,13 @@ module Restforce
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def execute
|
31
|
-
return @results
|
31
|
+
return @results unless @results.nil?
|
32
32
|
query = @query_builder.to_s
|
33
|
-
|
34
|
-
@results = @salesforce.query(query)
|
33
|
+
@results = @restforce_client.query(query)
|
35
34
|
end
|
36
35
|
|
37
|
-
def each
|
38
|
-
execute
|
36
|
+
def each(&block)
|
37
|
+
execute.each(&block)
|
39
38
|
end
|
40
39
|
|
41
40
|
def find
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: restforce-query
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Santiago Ocamica
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|