query_helper 0.1.5 → 0.1.6

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: 7b9afd63373b33bf0c2f1dce1bccf08842db0aa811b72cc6390ba235f3232bbd
4
- data.tar.gz: efe1ea85137f17bb102a4779f5ae669530778df077fcb4f9393ecffe467f1f19
3
+ metadata.gz: 57e18fef49ee5e918c533ad632c3f01a6a6748a751675dc4d917e898072ab391
4
+ data.tar.gz: 6125eac1ac5f019ff7e686a19abe78824fe96f3cec110f02abc8f727d847cc18
5
5
  SHA512:
6
- metadata.gz: 3d1744f4a0550cf55b1bc31012d492be9ddc4b3c281b75925afba35888dea7b6e5a9db2e94498ba99a30d269f8172567cce3e6e5a67765b8ed7ce7fc65722c1f
7
- data.tar.gz: 8559aed42b400167060874c43b9cfafc772ffcebb8adc7003d0f4eb63028ef08c337925380cc3fe4b92527dfe732f5d2f3da0bd37de510851bd65a8de4e01096
6
+ metadata.gz: 4a945428a4dcc38487353461705dd52e9ef5e46acf7f81b5d3a871a3161d588ed36022cf5c313d6451ba837c25b0ea47cc7f90ccee57512034d8cae89da8bdb3
7
+ data.tar.gz: 94ffe7976b315a38557ea21ab9faa52e8ad24a61a9f30d2c52520f63c9bd6b1385a7d756a3bc801e9fd8328a136703151ea3868fa4afe995ca51ac5a50ac078d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- query_helper (0.1.5)
4
+ query_helper (0.1.6)
5
5
  activerecord (~> 5.0)
6
6
  activesupport (~> 5.0)
7
7
 
data/lib/query_helper.rb CHANGED
@@ -109,11 +109,19 @@ class QueryHelper
109
109
  manipulator.build()
110
110
  end
111
111
 
112
- def view_query
112
+ def to_json(args)
113
+ results.to_json
114
+ end
115
+
116
+ def to_sql
113
117
  query = build_query()
114
118
  @model.sanitize_sql_array([query, @bind_variables])
115
119
  end
116
120
 
121
+ def view_query
122
+ to_sql
123
+ end
124
+
117
125
  def execute_query
118
126
  query = build_query()
119
127
  @results = @model.find_by_sql([query, @bind_variables]) # Execute Sql Query
@@ -125,7 +133,7 @@ class QueryHelper
125
133
  clean_results()
126
134
  end
127
135
 
128
- def results()
136
+ def results
129
137
  execute_query()
130
138
  return paginated_results() if @api_payload
131
139
  return @results
@@ -1,3 +1,3 @@
1
1
  class QueryHelper
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: query_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan McDaniel
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-10-02 00:00:00.000000000 Z
11
+ date: 2019-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler