inquery 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +16 -0
- data/.releaser_config +4 -0
- data/.rubocop.yml +42 -0
- data/.travis.yml +9 -0
- data/.yardopts +1 -0
- data/Gemfile +4 -0
- data/LICENSE +21 -0
- data/README.md +288 -0
- data/RUBY_VERSION +1 -0
- data/Rakefile +36 -0
- data/VERSION +1 -0
- data/doc/Inquery.html +119 -0
- data/doc/Inquery/Exceptions.html +115 -0
- data/doc/Inquery/Exceptions/Base.html +127 -0
- data/doc/Inquery/Exceptions/InvalidRelation.html +131 -0
- data/doc/Inquery/Exceptions/UnknownCallSignature.html +131 -0
- data/doc/Inquery/Mixins.html +117 -0
- data/doc/Inquery/Mixins/RelationValidation.html +334 -0
- data/doc/Inquery/Mixins/RelationValidation/ClassMethods.html +190 -0
- data/doc/Inquery/Mixins/SchemaValidation.html +124 -0
- data/doc/Inquery/Mixins/SchemaValidation/ClassMethods.html +192 -0
- data/doc/Inquery/Query.html +736 -0
- data/doc/Inquery/Query/Chainable.html +476 -0
- data/doc/_index.html +254 -0
- data/doc/class_list.html +58 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +339 -0
- data/doc/file.README.html +365 -0
- data/doc/file_list.html +60 -0
- data/doc/frames.html +26 -0
- data/doc/index.html +365 -0
- data/doc/js/app.js +219 -0
- data/doc/js/full_list.js +181 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +147 -0
- data/doc/top-level-namespace.html +112 -0
- data/inquery.gemspec +58 -0
- data/lib/inquery.rb +10 -0
- data/lib/inquery/exceptions.rb +7 -0
- data/lib/inquery/mixins/relation_validation.rb +100 -0
- data/lib/inquery/mixins/schema_validation.rb +27 -0
- data/lib/inquery/query.rb +50 -0
- data/lib/inquery/query/chainable.rb +53 -0
- data/test/db/models.rb +20 -0
- data/test/db/schema.rb +20 -0
- data/test/inquery/query/chainable_test.rb +67 -0
- data/test/inquery/query_test.rb +47 -0
- data/test/queries/group/fetch_as_json.rb +13 -0
- data/test/queries/group/fetch_green.rb +11 -0
- data/test/queries/group/fetch_red.rb +11 -0
- data/test/queries/group/filter_with_color.rb +12 -0
- data/test/queries/user/fetch_all.rb +9 -0
- data/test/queries/user/fetch_in_group.rb +13 -0
- data/test/queries/user/fetch_in_group_rel.rb +17 -0
- data/test/test_helper.rb +26 -0
- metadata +265 -0
@@ -0,0 +1,736 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Class: Inquery::Query
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../';
|
20
|
+
framesUrl = "../frames.html#!Inquery/Query.html";
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="../_index.html">Index (Q)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../Inquery.html" title="Inquery (module)">Inquery</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">Query</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Class: Inquery::Query
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName">Object</span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next">Inquery::Query</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
<dt class="r2">Includes:</dt>
|
94
|
+
<dd class="r2"><span class='object_link'><a href="Mixins/SchemaValidation.html" title="Inquery::Mixins::SchemaValidation (module)">Mixins::SchemaValidation</a></span></dd>
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
<dt class="r1 last">Defined in:</dt>
|
101
|
+
<dd class="r1 last">lib/inquery/query.rb</dd>
|
102
|
+
|
103
|
+
</dl>
|
104
|
+
<div class="clear"></div>
|
105
|
+
|
106
|
+
<div id="subclasses">
|
107
|
+
<h2>Direct Known Subclasses</h2>
|
108
|
+
<p class="children"><span class='object_link'><a href="Query/Chainable.html" title="Inquery::Query::Chainable (class)">Chainable</a></span></p>
|
109
|
+
</div>
|
110
|
+
<h2>Defined Under Namespace</h2>
|
111
|
+
<p class="children">
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Query/Chainable.html" title="Inquery::Query::Chainable (class)">Chainable</a></span>
|
117
|
+
|
118
|
+
|
119
|
+
</p>
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
125
|
+
<ul class="summary">
|
126
|
+
|
127
|
+
<li class="public ">
|
128
|
+
<span class="summary_signature">
|
129
|
+
|
130
|
+
<a href="#params-instance_method" title="#params (instance method)">- (Object) <strong>params</strong> </a>
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
</span>
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
<span class="note title readonly">readonly</span>
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
<span class="summary_desc"><div class='inline'>
|
150
|
+
<p>Returns the value of attribute params.</p>
|
151
|
+
</div></span>
|
152
|
+
|
153
|
+
</li>
|
154
|
+
|
155
|
+
|
156
|
+
</ul>
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
<h2>
|
163
|
+
Class Method Summary
|
164
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
165
|
+
</h2>
|
166
|
+
|
167
|
+
<ul class="summary">
|
168
|
+
|
169
|
+
<li class="public ">
|
170
|
+
<span class="summary_signature">
|
171
|
+
|
172
|
+
<a href="#call-class_method" title="call (class method)">+ (Object) <strong>call</strong>(*args) </a>
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
</span>
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
<span class="summary_desc"><div class='inline'>
|
187
|
+
<p>Instantiates the query class using the given arguments and runs
|
188
|
+
<code>call</code> on it.</p>
|
189
|
+
</div></span>
|
190
|
+
|
191
|
+
</li>
|
192
|
+
|
193
|
+
|
194
|
+
<li class="public ">
|
195
|
+
<span class="summary_signature">
|
196
|
+
|
197
|
+
<a href="#run-class_method" title="run (class method)">+ (Object) <strong>run</strong>(*args) </a>
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
</span>
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
<span class="summary_desc"><div class='inline'>
|
212
|
+
<p>Instantiates the query class using the given arguments and runs
|
213
|
+
<code>call</code> and <code>process</code> on it.</p>
|
214
|
+
</div></span>
|
215
|
+
|
216
|
+
</li>
|
217
|
+
|
218
|
+
|
219
|
+
</ul>
|
220
|
+
|
221
|
+
<h2>
|
222
|
+
Instance Method Summary
|
223
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
224
|
+
</h2>
|
225
|
+
|
226
|
+
<ul class="summary">
|
227
|
+
|
228
|
+
<li class="public ">
|
229
|
+
<span class="summary_signature">
|
230
|
+
|
231
|
+
<a href="#call-instance_method" title="#call (instance method)">- (Object) <strong>call</strong> </a>
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
</span>
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
<span class="summary_desc"><div class='inline'>
|
246
|
+
<p>Override this method to perform the actual query.</p>
|
247
|
+
</div></span>
|
248
|
+
|
249
|
+
</li>
|
250
|
+
|
251
|
+
|
252
|
+
<li class="public ">
|
253
|
+
<span class="summary_signature">
|
254
|
+
|
255
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Query) <strong>initialize</strong>(params = {}) </a>
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
</span>
|
260
|
+
|
261
|
+
|
262
|
+
<span class="note title constructor">constructor</span>
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
<span class="summary_desc"><div class='inline'>
|
272
|
+
<p>Instantiates the query class and validates the given params hash (if there
|
273
|
+
was a validation schema specified).</p>
|
274
|
+
</div></span>
|
275
|
+
|
276
|
+
</li>
|
277
|
+
|
278
|
+
|
279
|
+
<li class="public ">
|
280
|
+
<span class="summary_signature">
|
281
|
+
|
282
|
+
<a href="#osparams-instance_method" title="#osparams (instance method)">- (Object) <strong>osparams</strong> </a>
|
283
|
+
|
284
|
+
|
285
|
+
|
286
|
+
</span>
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
<span class="summary_desc"><div class='inline'>
|
297
|
+
<p>Returns a copy of the query's params, wrapped in an OpenStruct object
|
298
|
+
for easyer access.</p>
|
299
|
+
</div></span>
|
300
|
+
|
301
|
+
</li>
|
302
|
+
|
303
|
+
|
304
|
+
<li class="public ">
|
305
|
+
<span class="summary_signature">
|
306
|
+
|
307
|
+
<a href="#process-instance_method" title="#process (instance method)">- (Object) <strong>process</strong>(results) </a>
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
</span>
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
<span class="summary_desc"><div class='inline'>
|
322
|
+
<p>Override this method to perform an optional result postprocessing.</p>
|
323
|
+
</div></span>
|
324
|
+
|
325
|
+
</li>
|
326
|
+
|
327
|
+
|
328
|
+
<li class="public ">
|
329
|
+
<span class="summary_signature">
|
330
|
+
|
331
|
+
<a href="#run-instance_method" title="#run (instance method)">- (Object) <strong>run</strong> </a>
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
</span>
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
<span class="summary_desc"><div class='inline'>
|
346
|
+
<p>Runs both <code>call</code> and <code>process</code>.</p>
|
347
|
+
</div></span>
|
348
|
+
|
349
|
+
</li>
|
350
|
+
|
351
|
+
|
352
|
+
</ul>
|
353
|
+
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
|
358
|
+
|
359
|
+
|
360
|
+
|
361
|
+
|
362
|
+
<div id="constructor_details" class="method_details_list">
|
363
|
+
<h2>Constructor Details</h2>
|
364
|
+
|
365
|
+
<div class="method_details first">
|
366
|
+
<h3 class="signature first" id="initialize-instance_method">
|
367
|
+
|
368
|
+
- (<tt><span class='object_link'><a href="" title="Inquery::Query (class)">Query</a></span></tt>) <strong>initialize</strong>(params = {})
|
369
|
+
|
370
|
+
|
371
|
+
|
372
|
+
|
373
|
+
|
374
|
+
</h3><div class="docstring">
|
375
|
+
<div class="discussion">
|
376
|
+
|
377
|
+
<p>Instantiates the query class and validates the given params hash (if there
|
378
|
+
was a validation schema specified).</p>
|
379
|
+
|
380
|
+
|
381
|
+
</div>
|
382
|
+
</div>
|
383
|
+
<div class="tags">
|
384
|
+
|
385
|
+
|
386
|
+
</div><table class="source_code">
|
387
|
+
<tr>
|
388
|
+
<td>
|
389
|
+
<pre class="lines">
|
390
|
+
|
391
|
+
|
392
|
+
21
|
393
|
+
22
|
394
|
+
23
|
395
|
+
24
|
396
|
+
25
|
397
|
+
26
|
398
|
+
27</pre>
|
399
|
+
</td>
|
400
|
+
<td>
|
401
|
+
<pre class="code"><span class="info file"># File 'lib/inquery/query.rb', line 21</span>
|
402
|
+
|
403
|
+
<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>
|
404
|
+
<span class='ivar'>@params</span> <span class='op'>=</span> <span class='id identifier rubyid_params'>params</span>
|
405
|
+
|
406
|
+
<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>
|
407
|
+
<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>
|
408
|
+
<span class='kw'>end</span>
|
409
|
+
<span class='kw'>end</span></pre>
|
410
|
+
</td>
|
411
|
+
</tr>
|
412
|
+
</table>
|
413
|
+
</div>
|
414
|
+
|
415
|
+
</div>
|
416
|
+
|
417
|
+
<div id="instance_attr_details" class="attr_details">
|
418
|
+
<h2>Instance Attribute Details</h2>
|
419
|
+
|
420
|
+
|
421
|
+
<span id=""></span>
|
422
|
+
<div class="method_details first">
|
423
|
+
<h3 class="signature first" id="params-instance_method">
|
424
|
+
|
425
|
+
- (<tt>Object</tt>) <strong>params</strong> <span class="extras">(readonly)</span>
|
426
|
+
|
427
|
+
|
428
|
+
|
429
|
+
|
430
|
+
|
431
|
+
</h3><div class="docstring">
|
432
|
+
<div class="discussion">
|
433
|
+
|
434
|
+
<p>Returns the value of attribute params</p>
|
435
|
+
|
436
|
+
|
437
|
+
</div>
|
438
|
+
</div>
|
439
|
+
<div class="tags">
|
440
|
+
|
441
|
+
|
442
|
+
</div><table class="source_code">
|
443
|
+
<tr>
|
444
|
+
<td>
|
445
|
+
<pre class="lines">
|
446
|
+
|
447
|
+
|
448
|
+
5
|
449
|
+
6
|
450
|
+
7</pre>
|
451
|
+
</td>
|
452
|
+
<td>
|
453
|
+
<pre class="code"><span class="info file"># File 'lib/inquery/query.rb', line 5</span>
|
454
|
+
|
455
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_params'>params</span>
|
456
|
+
<span class='ivar'>@params</span>
|
457
|
+
<span class='kw'>end</span></pre>
|
458
|
+
</td>
|
459
|
+
</tr>
|
460
|
+
</table>
|
461
|
+
</div>
|
462
|
+
|
463
|
+
</div>
|
464
|
+
|
465
|
+
|
466
|
+
<div id="class_method_details" class="method_details_list">
|
467
|
+
<h2>Class Method Details</h2>
|
468
|
+
|
469
|
+
|
470
|
+
<div class="method_details first">
|
471
|
+
<h3 class="signature first" id="call-class_method">
|
472
|
+
|
473
|
+
+ (<tt>Object</tt>) <strong>call</strong>(*args)
|
474
|
+
|
475
|
+
|
476
|
+
|
477
|
+
|
478
|
+
|
479
|
+
</h3><div class="docstring">
|
480
|
+
<div class="discussion">
|
481
|
+
|
482
|
+
<p>Instantiates the query class using the given arguments and runs
|
483
|
+
<code>call</code> on it.</p>
|
484
|
+
|
485
|
+
|
486
|
+
</div>
|
487
|
+
</div>
|
488
|
+
<div class="tags">
|
489
|
+
|
490
|
+
|
491
|
+
</div><table class="source_code">
|
492
|
+
<tr>
|
493
|
+
<td>
|
494
|
+
<pre class="lines">
|
495
|
+
|
496
|
+
|
497
|
+
15
|
498
|
+
16
|
499
|
+
17</pre>
|
500
|
+
</td>
|
501
|
+
<td>
|
502
|
+
<pre class="code"><span class="info file"># File 'lib/inquery/query.rb', line 15</span>
|
503
|
+
|
504
|
+
<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>
|
505
|
+
<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>
|
506
|
+
<span class='kw'>end</span></pre>
|
507
|
+
</td>
|
508
|
+
</tr>
|
509
|
+
</table>
|
510
|
+
</div>
|
511
|
+
|
512
|
+
<div class="method_details ">
|
513
|
+
<h3 class="signature " id="run-class_method">
|
514
|
+
|
515
|
+
+ (<tt>Object</tt>) <strong>run</strong>(*args)
|
516
|
+
|
517
|
+
|
518
|
+
|
519
|
+
|
520
|
+
|
521
|
+
</h3><div class="docstring">
|
522
|
+
<div class="discussion">
|
523
|
+
|
524
|
+
<p>Instantiates the query class using the given arguments and runs
|
525
|
+
<code>call</code> and <code>process</code> on it.</p>
|
526
|
+
|
527
|
+
|
528
|
+
</div>
|
529
|
+
</div>
|
530
|
+
<div class="tags">
|
531
|
+
|
532
|
+
|
533
|
+
</div><table class="source_code">
|
534
|
+
<tr>
|
535
|
+
<td>
|
536
|
+
<pre class="lines">
|
537
|
+
|
538
|
+
|
539
|
+
9
|
540
|
+
10
|
541
|
+
11</pre>
|
542
|
+
</td>
|
543
|
+
<td>
|
544
|
+
<pre class="code"><span class="info file"># File 'lib/inquery/query.rb', line 9</span>
|
545
|
+
|
546
|
+
<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>
|
547
|
+
<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>
|
548
|
+
<span class='kw'>end</span></pre>
|
549
|
+
</td>
|
550
|
+
</tr>
|
551
|
+
</table>
|
552
|
+
</div>
|
553
|
+
|
554
|
+
</div>
|
555
|
+
|
556
|
+
<div id="instance_method_details" class="method_details_list">
|
557
|
+
<h2>Instance Method Details</h2>
|
558
|
+
|
559
|
+
|
560
|
+
<div class="method_details first">
|
561
|
+
<h3 class="signature first" id="call-instance_method">
|
562
|
+
|
563
|
+
- (<tt>Object</tt>) <strong>call</strong>
|
564
|
+
|
565
|
+
|
566
|
+
|
567
|
+
|
568
|
+
|
569
|
+
</h3><div class="docstring">
|
570
|
+
<div class="discussion">
|
571
|
+
|
572
|
+
<p>Override this method to perform the actual query.</p>
|
573
|
+
|
574
|
+
|
575
|
+
</div>
|
576
|
+
</div>
|
577
|
+
<div class="tags">
|
578
|
+
|
579
|
+
|
580
|
+
</div><table class="source_code">
|
581
|
+
<tr>
|
582
|
+
<td>
|
583
|
+
<pre class="lines">
|
584
|
+
|
585
|
+
|
586
|
+
35
|
587
|
+
36
|
588
|
+
37</pre>
|
589
|
+
</td>
|
590
|
+
<td>
|
591
|
+
<pre class="code"><span class="info file"># File 'lib/inquery/query.rb', line 35</span>
|
592
|
+
|
593
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_call'>call</span>
|
594
|
+
<span class='id identifier rubyid_fail'>fail</span> <span class='const'>NotImplementedError</span>
|
595
|
+
<span class='kw'>end</span></pre>
|
596
|
+
</td>
|
597
|
+
</tr>
|
598
|
+
</table>
|
599
|
+
</div>
|
600
|
+
|
601
|
+
<div class="method_details ">
|
602
|
+
<h3 class="signature " id="osparams-instance_method">
|
603
|
+
|
604
|
+
- (<tt>Object</tt>) <strong>osparams</strong>
|
605
|
+
|
606
|
+
|
607
|
+
|
608
|
+
|
609
|
+
|
610
|
+
</h3><div class="docstring">
|
611
|
+
<div class="discussion">
|
612
|
+
|
613
|
+
<p>Returns a copy of the query's params, wrapped in an OpenStruct object
|
614
|
+
for easyer access.</p>
|
615
|
+
|
616
|
+
|
617
|
+
</div>
|
618
|
+
</div>
|
619
|
+
<div class="tags">
|
620
|
+
|
621
|
+
|
622
|
+
</div><table class="source_code">
|
623
|
+
<tr>
|
624
|
+
<td>
|
625
|
+
<pre class="lines">
|
626
|
+
|
627
|
+
|
628
|
+
46
|
629
|
+
47
|
630
|
+
48</pre>
|
631
|
+
</td>
|
632
|
+
<td>
|
633
|
+
<pre class="code"><span class="info file"># File 'lib/inquery/query.rb', line 46</span>
|
634
|
+
|
635
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_osparams'>osparams</span>
|
636
|
+
<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>
|
637
|
+
<span class='kw'>end</span></pre>
|
638
|
+
</td>
|
639
|
+
</tr>
|
640
|
+
</table>
|
641
|
+
</div>
|
642
|
+
|
643
|
+
<div class="method_details ">
|
644
|
+
<h3 class="signature " id="process-instance_method">
|
645
|
+
|
646
|
+
- (<tt>Object</tt>) <strong>process</strong>(results)
|
647
|
+
|
648
|
+
|
649
|
+
|
650
|
+
|
651
|
+
|
652
|
+
</h3><div class="docstring">
|
653
|
+
<div class="discussion">
|
654
|
+
|
655
|
+
<p>Override this method to perform an optional result postprocessing.</p>
|
656
|
+
|
657
|
+
|
658
|
+
</div>
|
659
|
+
</div>
|
660
|
+
<div class="tags">
|
661
|
+
|
662
|
+
|
663
|
+
</div><table class="source_code">
|
664
|
+
<tr>
|
665
|
+
<td>
|
666
|
+
<pre class="lines">
|
667
|
+
|
668
|
+
|
669
|
+
40
|
670
|
+
41
|
671
|
+
42</pre>
|
672
|
+
</td>
|
673
|
+
<td>
|
674
|
+
<pre class="code"><span class="info file"># File 'lib/inquery/query.rb', line 40</span>
|
675
|
+
|
676
|
+
<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>
|
677
|
+
<span class='id identifier rubyid_results'>results</span>
|
678
|
+
<span class='kw'>end</span></pre>
|
679
|
+
</td>
|
680
|
+
</tr>
|
681
|
+
</table>
|
682
|
+
</div>
|
683
|
+
|
684
|
+
<div class="method_details ">
|
685
|
+
<h3 class="signature " id="run-instance_method">
|
686
|
+
|
687
|
+
- (<tt>Object</tt>) <strong>run</strong>
|
688
|
+
|
689
|
+
|
690
|
+
|
691
|
+
|
692
|
+
|
693
|
+
</h3><div class="docstring">
|
694
|
+
<div class="discussion">
|
695
|
+
|
696
|
+
<p>Runs both <code>call</code> and <code>process</code>.</p>
|
697
|
+
|
698
|
+
|
699
|
+
</div>
|
700
|
+
</div>
|
701
|
+
<div class="tags">
|
702
|
+
|
703
|
+
|
704
|
+
</div><table class="source_code">
|
705
|
+
<tr>
|
706
|
+
<td>
|
707
|
+
<pre class="lines">
|
708
|
+
|
709
|
+
|
710
|
+
30
|
711
|
+
31
|
712
|
+
32</pre>
|
713
|
+
</td>
|
714
|
+
<td>
|
715
|
+
<pre class="code"><span class="info file"># File 'lib/inquery/query.rb', line 30</span>
|
716
|
+
|
717
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_run'>run</span>
|
718
|
+
<span class='id identifier rubyid_process'>process</span><span class='lparen'>(</span><span class='id identifier rubyid_call'>call</span><span class='rparen'>)</span>
|
719
|
+
<span class='kw'>end</span></pre>
|
720
|
+
</td>
|
721
|
+
</tr>
|
722
|
+
</table>
|
723
|
+
</div>
|
724
|
+
|
725
|
+
</div>
|
726
|
+
|
727
|
+
</div>
|
728
|
+
|
729
|
+
<div id="footer">
|
730
|
+
Generated on Thu Jun 9 10:26:31 2016 by
|
731
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
732
|
+
0.8.7.6 (ruby-2.2.3).
|
733
|
+
</div>
|
734
|
+
|
735
|
+
</body>
|
736
|
+
</html>
|