inquery 0.1.0 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +26 -0
  3. data/LICENSE +2 -2
  4. data/README.md +41 -13
  5. data/RUBY_VERSION +1 -1
  6. data/Rakefile +2 -2
  7. data/VERSION +1 -1
  8. data/doc/Inquery.html +7 -7
  9. data/doc/Inquery/Exceptions.html +6 -6
  10. data/doc/Inquery/Exceptions/Base.html +6 -6
  11. data/doc/Inquery/Exceptions/InvalidRelation.html +6 -6
  12. data/doc/Inquery/Exceptions/UnknownCallSignature.html +6 -6
  13. data/doc/Inquery/Mixins.html +9 -9
  14. data/doc/Inquery/Mixins/RawSqlUtils.html +116 -0
  15. data/doc/Inquery/Mixins/RelationValidation.html +40 -36
  16. data/doc/Inquery/Mixins/RelationValidation/ClassMethods.html +12 -12
  17. data/doc/Inquery/Mixins/SchemaValidation.html +6 -6
  18. data/doc/Inquery/Mixins/SchemaValidation/ClassMethods.html +14 -20
  19. data/doc/Inquery/Query.html +105 -34
  20. data/doc/Inquery/Query/Chainable.html +78 -8
  21. data/doc/_index.html +18 -11
  22. data/doc/class_list.html +3 -3
  23. data/doc/css/style.css +12 -8
  24. data/doc/file.README.html +60 -33
  25. data/doc/file_list.html +2 -2
  26. data/doc/frames.html +2 -2
  27. data/doc/index.html +60 -33
  28. data/doc/js/app.js +69 -3
  29. data/doc/method_list.html +26 -10
  30. data/doc/top-level-namespace.html +6 -6
  31. data/inquery.gemspec +11 -11
  32. data/lib/inquery.rb +1 -0
  33. data/lib/inquery/mixins/raw_sql_utils.rb +23 -0
  34. data/lib/inquery/mixins/relation_validation.rb +16 -9
  35. data/lib/inquery/mixins/schema_validation.rb +5 -8
  36. data/lib/inquery/query.rb +9 -2
  37. data/lib/inquery/query/chainable.rb +5 -0
  38. data/test/inquery/query/chainable_test.rb +1 -1
  39. data/test/inquery/query_test.rb +2 -2
  40. data/test/queries/group/filter_with_color.rb +3 -1
  41. data/test/queries/user/fetch_in_group.rb +3 -3
  42. metadata +20 -18
@@ -6,15 +6,15 @@
6
6
  <title>
7
7
  Module: Inquery::Mixins::RelationValidation
8
8
 
9
- &mdash; Documentation by YARD 0.9.9
9
+ &mdash; Documentation by YARD 0.9.25
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" />
14
14
 
15
- <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" />
16
16
 
17
- <script type="text/javascript" charset="utf-8">
17
+ <script type="text/javascript">
18
18
  pathId = "Inquery::Mixins::RelationValidation";
19
19
  relpath = '../../';
20
20
  </script>
@@ -104,25 +104,28 @@
104
104
 
105
105
  </p>
106
106
 
107
- <h2>Constant Summary</h2>
108
- <dl class="constants">
109
-
110
- <dt id="OPTIONS_SCHEMA-constant" class="">OPTIONS_SCHEMA =
111
-
112
- </dt>
113
- <dd><pre class="code"><span class='lbrace'>{</span>
114
- <span class='label'>hash:</span> <span class='lbrace'>{</span>
115
- <span class='label'>class:</span> <span class='lbrace'>{</span> <span class='label'>type:</span> <span class='const'>String</span><span class='comma'>,</span> <span class='label'>null:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>required:</span> <span class='kw'>false</span> <span class='rbrace'>}</span><span class='comma'>,</span>
116
- <span class='label'>fields:</span> <span class='lbrace'>{</span> <span class='label'>type:</span> <span class='symbol'>:integer</span><span class='comma'>,</span> <span class='label'>null:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>required:</span> <span class='kw'>false</span> <span class='rbrace'>}</span><span class='comma'>,</span>
117
- <span class='label'>default_select:</span> <span class='lbrace'>{</span> <span class='label'>type:</span> <span class='symbol'>:symbol</span><span class='comma'>,</span> <span class='label'>null:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>required:</span> <span class='kw'>false</span> <span class='rbrace'>}</span><span class='comma'>,</span>
118
- <span class='label'>default:</span> <span class='lbrace'>{</span> <span class='label'>type:</span> <span class='lbracket'>[</span><span class='const'>Proc</span><span class='comma'>,</span> <span class='const'>FalseClass</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='label'>null:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>required:</span> <span class='kw'>false</span> <span class='rbrace'>}</span>
119
- <span class='rbrace'>}</span>
120
- <span class='rbrace'>}</span></pre></dd>
121
-
122
- <dt id="DEFAULT_OPTIONS-constant" class="">DEFAULT_OPTIONS =
123
-
124
- </dt>
125
- <dd><pre class="code"><span class='lbrace'>{</span>
107
+
108
+ <h2>
109
+ Constant Summary
110
+ <small><a href="#" class="constants_summary_toggle">collapse</a></small>
111
+ </h2>
112
+
113
+ <dl class="constants">
114
+
115
+ <dt id="OPTIONS_SCHEMA-constant" class="">OPTIONS_SCHEMA =
116
+
117
+ </dt>
118
+ <dd><pre class="code"><span class='const'>Schemacop</span><span class='op'>::</span><span class='const'>Schema</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>do</span>
119
+ <span class='id identifier rubyid_opt'>opt</span> <span class='symbol'>:class</span><span class='comma'>,</span> <span class='symbol'>:string</span>
120
+ <span class='id identifier rubyid_opt'>opt</span> <span class='symbol'>:fields</span><span class='comma'>,</span> <span class='symbol'>:integer</span>
121
+ <span class='id identifier rubyid_opt'>opt</span> <span class='symbol'>:default_select</span><span class='comma'>,</span> <span class='symbol'>:symbol</span>
122
+ <span class='id identifier rubyid_opt'>opt</span> <span class='symbol'>:default</span><span class='comma'>,</span> <span class='symbol'>:object</span><span class='comma'>,</span> <span class='label'>classes:</span> <span class='lbracket'>[</span><span class='const'>Proc</span><span class='comma'>,</span> <span class='const'>FalseClass</span><span class='rbracket'>]</span>
123
+ <span class='kw'>end</span></pre></dd>
124
+
125
+ <dt id="DEFAULT_OPTIONS-constant" class="">DEFAULT_OPTIONS =
126
+
127
+ </dt>
128
+ <dd><pre class="code"><span class='lbrace'>{</span>
126
129
  <span class='comment'># Allows to restrict the class (attribute `klass`) of the relation. Use
127
130
  </span> <span class='comment'># `nil` to not perform any checks. The `class` attribute will also be
128
131
  </span> <span class='comment'># taken to infer a default if no relation is given and you didn&#39;t
@@ -147,8 +150,9 @@
147
150
  </span> <span class='comment'># behavior.
148
151
  </span> <span class='label'>default_select:</span> <span class='symbol'>:id</span>
149
152
  <span class='rbrace'>}</span></pre></dd>
150
-
151
- </dl>
153
+
154
+ </dl>
155
+
152
156
 
153
157
 
154
158
 
@@ -223,13 +227,6 @@ options specified at class level using the <code>relation</code> method.</p>
223
227
  <pre class="lines">
224
228
 
225
229
 
226
- 56
227
- 57
228
- 58
229
- 59
230
- 60
231
- 61
232
- 62
233
230
  63
234
231
  64
235
232
  65
@@ -264,10 +261,17 @@ options specified at class level using the <code>relation</code> method.</p>
264
261
  94
265
262
  95
266
263
  96
267
- 97</pre>
264
+ 97
265
+ 98
266
+ 99
267
+ 100
268
+ 101
269
+ 102
270
+ 103
271
+ 104</pre>
268
272
  </td>
269
273
  <td>
270
- <pre class="code"><span class="info file"># File 'lib/inquery/mixins/relation_validation.rb', line 56</span>
274
+ <pre class="code"><span class="info file"># File 'lib/inquery/mixins/relation_validation.rb', line 63</span>
271
275
 
272
276
  <span class='kw'>def</span> <span class='id identifier rubyid_validate_relation!'>validate_relation!</span><span class='lparen'>(</span><span class='id identifier rubyid_relation'>relation</span><span class='rparen'>)</span>
273
277
  <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="#DEFAULT_OPTIONS-constant" title="Inquery::Mixins::RelationValidation::DEFAULT_OPTIONS (constant)">DEFAULT_OPTIONS</a></span></span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
@@ -321,9 +325,9 @@ options specified at class level using the <code>relation</code> method.</p>
321
325
  </div>
322
326
 
323
327
  <div id="footer">
324
- Generated on Tue May 16 10:49:05 2017 by
328
+ Generated on Tue Nov 24 16:32:43 2020 by
325
329
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
326
- 0.9.9 (ruby-2.3.1).
330
+ 0.9.25 (ruby-2.6.2).
327
331
  </div>
328
332
 
329
333
  </div>
@@ -6,15 +6,15 @@
6
6
  <title>
7
7
  Module: Inquery::Mixins::RelationValidation::ClassMethods
8
8
 
9
- &mdash; Documentation by YARD 0.9.9
9
+ &mdash; Documentation by YARD 0.9.25
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../../../css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="../../../css/style.css" type="text/css" />
14
14
 
15
- <link rel="stylesheet" href="../../../css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="../../../css/common.css" type="text/css" />
16
16
 
17
- <script type="text/javascript" charset="utf-8">
17
+ <script type="text/javascript">
18
18
  pathId = "Inquery::Mixins::RelationValidation::ClassMethods";
19
19
  relpath = '../../../';
20
20
  </script>
@@ -156,16 +156,16 @@ on. See <span class='object_link'><a href="../RelationValidation.html#OPTIONS_SC
156
156
  <pre class="lines">
157
157
 
158
158
 
159
- 48
160
- 49
161
- 50
162
- 51</pre>
159
+ 55
160
+ 56
161
+ 57
162
+ 58</pre>
163
163
  </td>
164
164
  <td>
165
- <pre class="code"><span class="info file"># File 'lib/inquery/mixins/relation_validation.rb', line 48</span>
165
+ <pre class="code"><span class="info file"># File 'lib/inquery/mixins/relation_validation.rb', line 55</span>
166
166
 
167
167
  <span class='kw'>def</span> <span class='id identifier rubyid_relation'>relation</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
168
- <span class='const'>Schemacop</span><span class='period'>.</span><span class='id identifier rubyid_validate!'>validate!</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../RelationValidation.html#OPTIONS_SCHEMA-constant" title="Inquery::Mixins::RelationValidation::OPTIONS_SCHEMA (constant)">OPTIONS_SCHEMA</a></span></span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
168
+ <span class='const'><span class='object_link'><a href="../RelationValidation.html#OPTIONS_SCHEMA-constant" title="Inquery::Mixins::RelationValidation::OPTIONS_SCHEMA (constant)">OPTIONS_SCHEMA</a></span></span><span class='period'>.</span><span class='id identifier rubyid_validate!'>validate!</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
169
169
  <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid__relation_options'>_relation_options</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span>
170
170
  <span class='kw'>end</span></pre>
171
171
  </td>
@@ -178,9 +178,9 @@ on. See <span class='object_link'><a href="../RelationValidation.html#OPTIONS_SC
178
178
  </div>
179
179
 
180
180
  <div id="footer">
181
- Generated on Tue May 16 10:49:05 2017 by
181
+ Generated on Tue Nov 24 16:32:43 2020 by
182
182
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
183
- 0.9.9 (ruby-2.3.1).
183
+ 0.9.25 (ruby-2.6.2).
184
184
  </div>
185
185
 
186
186
  </div>
@@ -6,15 +6,15 @@
6
6
  <title>
7
7
  Module: Inquery::Mixins::SchemaValidation
8
8
 
9
- &mdash; Documentation by YARD 0.9.9
9
+ &mdash; Documentation by YARD 0.9.25
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" />
14
14
 
15
- <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" />
16
16
 
17
- <script type="text/javascript" charset="utf-8">
17
+ <script type="text/javascript">
18
18
  pathId = "Inquery::Mixins::SchemaValidation";
19
19
  relpath = '../../';
20
20
  </script>
@@ -116,9 +116,9 @@
116
116
  </div>
117
117
 
118
118
  <div id="footer">
119
- Generated on Tue May 16 10:49:05 2017 by
119
+ Generated on Tue Nov 24 16:32:43 2020 by
120
120
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
121
- 0.9.9 (ruby-2.3.1).
121
+ 0.9.25 (ruby-2.6.2).
122
122
  </div>
123
123
 
124
124
  </div>
@@ -6,15 +6,15 @@
6
6
  <title>
7
7
  Module: Inquery::Mixins::SchemaValidation::ClassMethods
8
8
 
9
- &mdash; Documentation by YARD 0.9.9
9
+ &mdash; Documentation by YARD 0.9.25
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../../../css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="../../../css/style.css" type="text/css" />
14
14
 
15
- <link rel="stylesheet" href="../../../css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="../../../css/common.css" type="text/css" />
16
16
 
17
- <script type="text/javascript" charset="utf-8">
17
+ <script type="text/javascript">
18
18
  pathId = "Inquery::Mixins::SchemaValidation::ClassMethods";
19
19
  relpath = '../../../';
20
20
  </script>
@@ -101,7 +101,7 @@
101
101
  <li class="public ">
102
102
  <span class="summary_signature">
103
103
 
104
- <a href="#schema-instance_method" title="#schema (instance method)">#<strong>schema</strong>(schema) &#x21d2; Object </a>
104
+ <a href="#schema-instance_method" title="#schema (instance method)">#<strong>schema</strong>(*args, &amp;block) &#x21d2; Object </a>
105
105
 
106
106
 
107
107
 
@@ -132,7 +132,7 @@
132
132
  <div class="method_details first">
133
133
  <h3 class="signature first" id="schema-instance_method">
134
134
 
135
- #<strong>schema</strong>(schema) &#x21d2; <tt>Object</tt>
135
+ #<strong>schema</strong>(*args, &amp;block) &#x21d2; <tt>Object</tt>
136
136
 
137
137
 
138
138
 
@@ -152,22 +152,16 @@
152
152
  17
153
153
  18
154
154
  19
155
- 20
156
- 21
157
- 22
158
- 23</pre>
155
+ 20</pre>
159
156
  </td>
160
157
  <td>
161
158
  <pre class="code"><span class="info file"># File 'lib/inquery/mixins/schema_validation.rb', line 12</span>
162
159
 
163
- <span class='kw'>def</span> <span class='id identifier rubyid_schema'>schema</span><span class='lparen'>(</span><span class='id identifier rubyid_schema'>schema</span><span class='rparen'>)</span>
164
- <span class='id identifier rubyid_fail'>fail</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Schema must be a hash.</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_schema'>schema</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Hash</span><span class='rparen'>)</span>
165
-
166
- <span class='kw'>unless</span> <span class='id identifier rubyid_schema'>schema</span><span class='lbracket'>[</span><span class='symbol'>:type</span><span class='rbracket'>]</span>
167
- <span class='id identifier rubyid_schema'>schema</span> <span class='op'>=</span> <span class='lbrace'>{</span>
168
- <span class='label'>type:</span> <span class='symbol'>:hash</span><span class='comma'>,</span>
169
- <span class='label'>hash:</span> <span class='id identifier rubyid_schema'>schema</span>
170
- <span class='rbrace'>}</span>
160
+ <span class='kw'>def</span> <span class='id identifier rubyid_schema'>schema</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
161
+ <span class='kw'>if</span> <span class='kw'>defined?</span><span class='lparen'>(</span><span class='const'>Schemacop</span><span class='op'>::</span><span class='const'>V2</span><span class='rparen'>)</span>
162
+ <span class='id identifier rubyid_schema'>schema</span> <span class='op'>=</span> <span class='const'>Schemacop</span><span class='op'>::</span><span class='const'>V2</span><span class='op'>::</span><span class='const'>Schema</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
163
+ <span class='kw'>else</span>
164
+ <span class='id identifier rubyid_schema'>schema</span> <span class='op'>=</span> <span class='const'>Schemacop</span><span class='op'>::</span><span class='const'>Schema</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
171
165
  <span class='kw'>end</span>
172
166
 
173
167
  <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid__schema'>_schema</span> <span class='op'>=</span> <span class='id identifier rubyid_schema'>schema</span>
@@ -182,9 +176,9 @@
182
176
  </div>
183
177
 
184
178
  <div id="footer">
185
- Generated on Tue May 16 10:49:05 2017 by
179
+ Generated on Tue Nov 24 16:32:43 2020 by
186
180
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
187
- 0.9.9 (ruby-2.3.1).
181
+ 0.9.25 (ruby-2.6.2).
188
182
  </div>
189
183
 
190
184
  </div>
@@ -6,15 +6,15 @@
6
6
  <title>
7
7
  Class: Inquery::Query
8
8
 
9
- &mdash; Documentation by YARD 0.9.9
9
+ &mdash; Documentation by YARD 0.9.25
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
14
 
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
16
 
17
- <script type="text/javascript" charset="utf-8">
17
+ <script type="text/javascript">
18
18
  pathId = "Inquery::Query";
19
19
  relpath = '../';
20
20
  </script>
@@ -89,7 +89,7 @@
89
89
 
90
90
  <dl>
91
91
  <dt>Includes:</dt>
92
- <dd><span class='object_link'><a href="Mixins/SchemaValidation.html" title="Inquery::Mixins::SchemaValidation (module)">Mixins::SchemaValidation</a></span></dd>
92
+ <dd><span class='object_link'><a href="Mixins/RawSqlUtils.html" title="Inquery::Mixins::RawSqlUtils (module)">Mixins::RawSqlUtils</a></span>, <span class='object_link'><a href="Mixins/SchemaValidation.html" title="Inquery::Mixins::SchemaValidation (module)">Mixins::SchemaValidation</a></span></dd>
93
93
  </dl>
94
94
 
95
95
 
@@ -241,6 +241,29 @@
241
241
  <span class="summary_desc"><div class='inline'><p>Override this method to perform the actual query.</p>
242
242
  </div></span>
243
243
 
244
+ </li>
245
+
246
+
247
+ <li class="public ">
248
+ <span class="summary_signature">
249
+
250
+ <a href="#connection-instance_method" title="#connection (instance method)">#<strong>connection</strong> &#x21d2; Object </a>
251
+
252
+
253
+
254
+ </span>
255
+
256
+
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+ <span class="summary_desc"><div class='inline'><p>Provides a connection to the database.</p>
265
+ </div></span>
266
+
244
267
  </li>
245
268
 
246
269
 
@@ -348,6 +371,13 @@
348
371
 
349
372
 
350
373
 
374
+
375
+
376
+
377
+
378
+
379
+
380
+
351
381
  <div id="constructor_details" class="method_details_list">
352
382
  <h2>Constructor Details</h2>
353
383
 
@@ -377,22 +407,22 @@ was a validation schema specified).</p>
377
407
  <pre class="lines">
378
408
 
379
409
 
380
- 21
381
410
  22
382
411
  23
383
412
  24
384
413
  25
385
414
  26
386
- 27</pre>
415
+ 27
416
+ 28</pre>
387
417
  </td>
388
418
  <td>
389
- <pre class="code"><span class="info file"># File 'lib/inquery/query.rb', line 21</span>
419
+ <pre class="code"><span class="info file"># File 'lib/inquery/query.rb', line 22</span>
390
420
 
391
421
  <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
392
422
  <span class='ivar'>@params</span> <span class='op'>=</span> <span class='id identifier rubyid_params'>params</span>
393
423
 
394
- <span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid__schema'>_schema</span>
395
- <span class='const'>Schemacop</span><span class='period'>.</span><span class='id identifier rubyid_validate!'>validate!</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid__schema'>_schema</span><span class='comma'>,</span> <span class='ivar'>@params</span><span class='rparen'>)</span>
424
+ <span class='kw'>if</span> <span class='id identifier rubyid__schema'>_schema</span>
425
+ <span class='ivar'>@params</span> <span class='op'>=</span> <span class='id identifier rubyid__schema'>_schema</span><span class='period'>.</span><span class='id identifier rubyid_validate!'>validate!</span><span class='lparen'>(</span><span class='ivar'>@params</span><span class='rparen'>)</span>
396
426
  <span class='kw'>end</span>
397
427
  <span class='kw'>end</span></pre>
398
428
  </td>
@@ -418,7 +448,7 @@ was a validation schema specified).</p>
418
448
 
419
449
  </h3><div class="docstring">
420
450
  <div class="discussion">
421
- <p>Returns the value of attribute params</p>
451
+ <p>Returns the value of attribute params.</p>
422
452
 
423
453
 
424
454
  </div>
@@ -432,12 +462,12 @@ was a validation schema specified).</p>
432
462
  <pre class="lines">
433
463
 
434
464
 
435
- 5
436
465
  6
437
- 7</pre>
466
+ 7
467
+ 8</pre>
438
468
  </td>
439
469
  <td>
440
- <pre class="code"><span class="info file"># File 'lib/inquery/query.rb', line 5</span>
470
+ <pre class="code"><span class="info file"># File 'lib/inquery/query.rb', line 6</span>
441
471
 
442
472
  <span class='kw'>def</span> <span class='id identifier rubyid_params'>params</span>
443
473
  <span class='ivar'>@params</span>
@@ -480,12 +510,12 @@ and runs <code>call</code> on it.</p>
480
510
  <pre class="lines">
481
511
 
482
512
 
483
- 15
484
513
  16
485
- 17</pre>
514
+ 17
515
+ 18</pre>
486
516
  </td>
487
517
  <td>
488
- <pre class="code"><span class="info file"># File 'lib/inquery/query.rb', line 15</span>
518
+ <pre class="code"><span class="info file"># File 'lib/inquery/query.rb', line 16</span>
489
519
 
490
520
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
491
521
  <span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span>
@@ -521,12 +551,12 @@ and runs <code>call</code> and <code>process</code> on it.</p>
521
551
  <pre class="lines">
522
552
 
523
553
 
524
- 9
525
554
  10
526
- 11</pre>
555
+ 11
556
+ 12</pre>
527
557
  </td>
528
558
  <td>
529
- <pre class="code"><span class="info file"># File 'lib/inquery/query.rb', line 9</span>
559
+ <pre class="code"><span class="info file"># File 'lib/inquery/query.rb', line 10</span>
530
560
 
531
561
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
532
562
  <span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span>
@@ -567,12 +597,12 @@ and runs <code>call</code> and <code>process</code> on it.</p>
567
597
  <pre class="lines">
568
598
 
569
599
 
570
- 35
571
600
  36
572
- 37</pre>
601
+ 37
602
+ 38</pre>
573
603
  </td>
574
604
  <td>
575
- <pre class="code"><span class="info file"># File 'lib/inquery/query.rb', line 35</span>
605
+ <pre class="code"><span class="info file"># File 'lib/inquery/query.rb', line 36</span>
576
606
 
577
607
  <span class='kw'>def</span> <span class='id identifier rubyid_call'>call</span>
578
608
  <span class='id identifier rubyid_fail'>fail</span> <span class='const'>NotImplementedError</span>
@@ -580,6 +610,47 @@ and runs <code>call</code> and <code>process</code> on it.</p>
580
610
  </td>
581
611
  </tr>
582
612
  </table>
613
+ </div>
614
+
615
+ <div class="method_details ">
616
+ <h3 class="signature " id="connection-instance_method">
617
+
618
+ #<strong>connection</strong> &#x21d2; <tt>Object</tt>
619
+
620
+
621
+
622
+
623
+
624
+ </h3><div class="docstring">
625
+ <div class="discussion">
626
+ <p>Provides a connection to the database. May be overridden if a different
627
+ connection is desired. Defaults to <code>ActiveRecord::Base.connection</code>.</p>
628
+
629
+
630
+ </div>
631
+ </div>
632
+ <div class="tags">
633
+
634
+
635
+ </div><table class="source_code">
636
+ <tr>
637
+ <td>
638
+ <pre class="lines">
639
+
640
+
641
+ 53
642
+ 54
643
+ 55</pre>
644
+ </td>
645
+ <td>
646
+ <pre class="code"><span class="info file"># File 'lib/inquery/query.rb', line 53</span>
647
+
648
+ <span class='kw'>def</span> <span class='id identifier rubyid_connection'>connection</span>
649
+ <span class='const'>ActiveRecord</span><span class='op'>::</span><span class='const'>Base</span><span class='period'>.</span><span class='id identifier rubyid_connection'>connection</span>
650
+ <span class='kw'>end</span></pre>
651
+ </td>
652
+ </tr>
653
+ </table>
583
654
  </div>
584
655
 
585
656
  <div class="method_details ">
@@ -608,12 +679,12 @@ easyer access.</p>
608
679
  <pre class="lines">
609
680
 
610
681
 
611
- 46
612
682
  47
613
- 48</pre>
683
+ 48
684
+ 49</pre>
614
685
  </td>
615
686
  <td>
616
- <pre class="code"><span class="info file"># File 'lib/inquery/query.rb', line 46</span>
687
+ <pre class="code"><span class="info file"># File 'lib/inquery/query.rb', line 47</span>
617
688
 
618
689
  <span class='kw'>def</span> <span class='id identifier rubyid_osparams'>osparams</span>
619
690
  <span class='ivar'>@osparams</span> <span class='op'>||=</span> <span class='const'>OpenStruct</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
@@ -648,12 +719,12 @@ easyer access.</p>
648
719
  <pre class="lines">
649
720
 
650
721
 
651
- 40
652
722
  41
653
- 42</pre>
723
+ 42
724
+ 43</pre>
654
725
  </td>
655
726
  <td>
656
- <pre class="code"><span class="info file"># File 'lib/inquery/query.rb', line 40</span>
727
+ <pre class="code"><span class="info file"># File 'lib/inquery/query.rb', line 41</span>
657
728
 
658
729
  <span class='kw'>def</span> <span class='id identifier rubyid_process'>process</span><span class='lparen'>(</span><span class='id identifier rubyid_results'>results</span><span class='rparen'>)</span>
659
730
  <span class='id identifier rubyid_results'>results</span>
@@ -688,12 +759,12 @@ easyer access.</p>
688
759
  <pre class="lines">
689
760
 
690
761
 
691
- 30
692
762
  31
693
- 32</pre>
763
+ 32
764
+ 33</pre>
694
765
  </td>
695
766
  <td>
696
- <pre class="code"><span class="info file"># File 'lib/inquery/query.rb', line 30</span>
767
+ <pre class="code"><span class="info file"># File 'lib/inquery/query.rb', line 31</span>
697
768
 
698
769
  <span class='kw'>def</span> <span class='id identifier rubyid_run'>run</span>
699
770
  <span class='id identifier rubyid_process'>process</span><span class='lparen'>(</span><span class='id identifier rubyid_call'>call</span><span class='rparen'>)</span>
@@ -708,9 +779,9 @@ easyer access.</p>
708
779
  </div>
709
780
 
710
781
  <div id="footer">
711
- Generated on Tue May 16 10:49:05 2017 by
782
+ Generated on Tue Nov 24 16:32:43 2020 by
712
783
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
713
- 0.9.9 (ruby-2.3.1).
784
+ 0.9.25 (ruby-2.6.2).
714
785
  </div>
715
786
 
716
787
  </div>