inquery 1.0.10 → 1.1.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/.github/workflows/rubocop.yml +1 -1
- data/.github/workflows/ruby.yml +24 -8
- data/.gitignore +2 -2
- data/.rubocop.yml +4 -0
- data/Appraisals +24 -4
- data/CHANGELOG.md +47 -1
- data/Gemfile +17 -1
- data/Gemfile.lock +125 -0
- data/LICENSE +1 -1
- data/MIGRATION.md +260 -0
- data/README.md +31 -9
- data/RUBY_VERSION +1 -1
- data/Rakefile +4 -11
- data/VERSION +1 -1
- data/doc/Inquery/Exceptions/Base.html +4 -4
- data/doc/Inquery/Exceptions/InvalidRelation.html +4 -4
- data/doc/Inquery/Exceptions/UnknownCallSignature.html +4 -4
- data/doc/Inquery/Exceptions.html +4 -4
- data/doc/Inquery/MethodAccessibleHash.html +431 -0
- data/doc/Inquery/Mixins/RawSqlUtils.html +17 -4
- data/doc/Inquery/Mixins/RelationValidation/ClassMethods.html +8 -7
- data/doc/Inquery/Mixins/RelationValidation.html +9 -8
- data/doc/Inquery/Mixins/SchemaValidation/ClassMethods.html +20 -6
- data/doc/Inquery/Mixins/SchemaValidation.html +4 -4
- data/doc/Inquery/Mixins.html +4 -4
- data/doc/Inquery/Query/Chainable.html +207 -90
- data/doc/Inquery/Query.html +401 -73
- data/doc/Inquery.html +121 -6
- data/doc/_index.html +12 -5
- data/doc/class_list.html +6 -3
- data/doc/css/full_list.css +3 -3
- data/doc/css/style.css +6 -0
- data/doc/file.README.html +118 -17
- data/doc/file_list.html +5 -2
- data/doc/frames.html +10 -5
- data/doc/index.html +118 -17
- data/doc/js/app.js +294 -264
- data/doc/js/full_list.js +30 -4
- data/doc/method_list.html +52 -17
- data/doc/top-level-namespace.html +4 -4
- data/gemfiles/rails_5.2.gemfile +1 -0
- data/gemfiles/rails_6.0.gemfile +1 -0
- data/gemfiles/rails_6.1.gemfile +1 -0
- data/gemfiles/rails_7.0.gemfile +1 -0
- data/gemfiles/{rails_5.1.gemfile → rails_7.1.gemfile} +2 -1
- data/gemfiles/rails_7.2.gemfile +8 -0
- data/gemfiles/rails_8.0.gemfile +8 -0
- data/gemfiles/rails_8.1.gemfile +8 -0
- data/inquery.gemspec +11 -34
- data/lib/inquery/method_accessible_hash.rb +45 -0
- data/lib/inquery/mixins/raw_sql_utils.rb +32 -6
- data/lib/inquery/mixins/relation_validation.rb +1 -1
- data/lib/inquery/mixins/schema_validation.rb +8 -1
- data/lib/inquery/query/chainable.rb +69 -27
- data/lib/inquery/query.rb +67 -14
- data/lib/inquery.rb +9 -0
- data/test/inquery/error_handling_test.rb +117 -0
- data/test/inquery/method_accessible_hash_test.rb +85 -0
- data/test/inquery/mixins/raw_sql_utils_test.rb +67 -0
- data/test/inquery/query/chainable_test.rb +78 -0
- data/test/inquery/query_test.rb +86 -0
- data/test/test_helper.rb +11 -0
- metadata +30 -129
- data/.yardopts +0 -1
data/doc/index.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
File: README
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.37
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
@@ -80,16 +80,103 @@ to your <code>Gemfile</code>:</p>
|
|
|
80
80
|
|
|
81
81
|
<h2 id="compatibility">Compatibility</h2>
|
|
82
82
|
|
|
83
|
-
<p>Inquery is tested
|
|
84
|
-
|
|
85
|
-
<
|
|
86
|
-
<
|
|
87
|
-
<
|
|
88
|
-
<
|
|
89
|
-
<
|
|
90
|
-
</
|
|
91
|
-
|
|
92
|
-
<
|
|
83
|
+
<p>Inquery is tested against multiple Ruby and Rails version combinations. The following table shows the compatibility matrix:</p>
|
|
84
|
+
|
|
85
|
+
<table><thead>
|
|
86
|
+
<tr>
|
|
87
|
+
<th>Ruby Version</th>
|
|
88
|
+
<th>Rails 5.2</th>
|
|
89
|
+
<th>Rails 6.0</th>
|
|
90
|
+
<th>Rails 6.1</th>
|
|
91
|
+
<th>Rails 7.0</th>
|
|
92
|
+
<th>Rails 7.1</th>
|
|
93
|
+
<th>Rails 7.2</th>
|
|
94
|
+
<th>Rails 8.0</th>
|
|
95
|
+
<th>Rails 8.1</th>
|
|
96
|
+
</tr>
|
|
97
|
+
</thead><tbody>
|
|
98
|
+
<tr>
|
|
99
|
+
<td>2.6.2</td>
|
|
100
|
+
<td>✓</td>
|
|
101
|
+
<td>✓</td>
|
|
102
|
+
<td>✓</td>
|
|
103
|
+
<td>-</td>
|
|
104
|
+
<td>-</td>
|
|
105
|
+
<td>-</td>
|
|
106
|
+
<td>-</td>
|
|
107
|
+
<td>-</td>
|
|
108
|
+
</tr>
|
|
109
|
+
<tr>
|
|
110
|
+
<td>2.7.1</td>
|
|
111
|
+
<td>-</td>
|
|
112
|
+
<td>✓</td>
|
|
113
|
+
<td>✓</td>
|
|
114
|
+
<td>✓</td>
|
|
115
|
+
<td>-</td>
|
|
116
|
+
<td>-</td>
|
|
117
|
+
<td>-</td>
|
|
118
|
+
<td>-</td>
|
|
119
|
+
</tr>
|
|
120
|
+
<tr>
|
|
121
|
+
<td>3.0.1</td>
|
|
122
|
+
<td>-</td>
|
|
123
|
+
<td>-</td>
|
|
124
|
+
<td>✓</td>
|
|
125
|
+
<td>✓</td>
|
|
126
|
+
<td>-</td>
|
|
127
|
+
<td>-</td>
|
|
128
|
+
<td>-</td>
|
|
129
|
+
<td>-</td>
|
|
130
|
+
</tr>
|
|
131
|
+
<tr>
|
|
132
|
+
<td>3.1.0</td>
|
|
133
|
+
<td>-</td>
|
|
134
|
+
<td>-</td>
|
|
135
|
+
<td>-</td>
|
|
136
|
+
<td>✓</td>
|
|
137
|
+
<td>✓</td>
|
|
138
|
+
<td>-</td>
|
|
139
|
+
<td>-</td>
|
|
140
|
+
<td>-</td>
|
|
141
|
+
</tr>
|
|
142
|
+
<tr>
|
|
143
|
+
<td>3.2.0</td>
|
|
144
|
+
<td>-</td>
|
|
145
|
+
<td>-</td>
|
|
146
|
+
<td>-</td>
|
|
147
|
+
<td>✓</td>
|
|
148
|
+
<td>✓</td>
|
|
149
|
+
<td>✓</td>
|
|
150
|
+
<td>-</td>
|
|
151
|
+
<td>-</td>
|
|
152
|
+
</tr>
|
|
153
|
+
<tr>
|
|
154
|
+
<td>3.3.0</td>
|
|
155
|
+
<td>-</td>
|
|
156
|
+
<td>-</td>
|
|
157
|
+
<td>-</td>
|
|
158
|
+
<td>✓</td>
|
|
159
|
+
<td>✓</td>
|
|
160
|
+
<td>✓</td>
|
|
161
|
+
<td>✓</td>
|
|
162
|
+
<td>✓</td>
|
|
163
|
+
</tr>
|
|
164
|
+
<tr>
|
|
165
|
+
<td>3.4.1</td>
|
|
166
|
+
<td>-</td>
|
|
167
|
+
<td>-</td>
|
|
168
|
+
<td>-</td>
|
|
169
|
+
<td>-</td>
|
|
170
|
+
<td>-</td>
|
|
171
|
+
<td>✓</td>
|
|
172
|
+
<td>✓</td>
|
|
173
|
+
<td>✓</td>
|
|
174
|
+
</tr>
|
|
175
|
+
</tbody></table>
|
|
176
|
+
|
|
177
|
+
<p><strong>Minimum supported versions:</strong> Ruby 2.6.2 and Rails 5.2</p>
|
|
178
|
+
|
|
179
|
+
<p>Other Ruby/Rails version combinations might work but are not covered by our automated tests.</p>
|
|
93
180
|
|
|
94
181
|
<h2 id="basic-usage">Basic usage</h2>
|
|
95
182
|
|
|
@@ -343,7 +430,9 @@ access.</p>
|
|
|
343
430
|
</code></pre>
|
|
344
431
|
|
|
345
432
|
<p>Inquery supports both schemacop specification versions 2 and 3 using the methods
|
|
346
|
-
<code>
|
|
433
|
+
<code>schema2</code> for version 2 and method <code>schema3</code> for version 3. You can also use the
|
|
434
|
+
method <code>schema</code>, which defaults to the schema version configured using
|
|
435
|
+
<code>config.default_schema_version</code> (see <a href="#Configuration">Configuration</a>).</p>
|
|
347
436
|
|
|
348
437
|
<h2 id="rails-integration">Rails integration</h2>
|
|
349
438
|
|
|
@@ -352,6 +441,17 @@ perfectly integrated into any Rails application. It has proven to be a winning
|
|
|
352
441
|
concept to extract all complex queries into separate classes that are
|
|
353
442
|
independently executable and testable.</p>
|
|
354
443
|
|
|
444
|
+
<h2 id="configuration">Configuration</h2>
|
|
445
|
+
|
|
446
|
+
<p>Inquery can be configured globally using an optional initializer:</p>
|
|
447
|
+
|
|
448
|
+
<pre class="code ruby"><code class="ruby"><span class='comment'># config/initializers/inquery.rb
|
|
449
|
+
</span><span class='const'><span class='object_link'><a href="Inquery.html" title="Inquery (module)">Inquery</a></span></span><span class='period'>.</span><span class='id identifier rubyid_setup'><span class='object_link'><a href="Inquery.html#setup-class_method" title="Inquery.setup (method)">setup</a></span></span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_config'>config</span><span class='op'>|</span>
|
|
450
|
+
<span class='comment'># Specify the default schemacop schema version. Can be one of 2 or 3.
|
|
451
|
+
</span> <span class='comment'># config.default_schema_version = 2
|
|
452
|
+
</span><span class='kw'>end</span>
|
|
453
|
+
</code></pre>
|
|
454
|
+
|
|
355
455
|
<h3 id="directory-structure">Directory structure</h3>
|
|
356
456
|
|
|
357
457
|
<p>While not enforced, it is encouraged to use the following structure for storing
|
|
@@ -383,17 +483,18 @@ query classes.</li>
|
|
|
383
483
|
<h2 id="contributors">Contributors</h2>
|
|
384
484
|
|
|
385
485
|
<p>Thanks to Jeroen Weeink for his insights regarding using query classes as scopes
|
|
386
|
-
in his <a href="http://craftingruby.com/posts/2015/06/29/query-objects-through-scopes.html">blog
|
|
486
|
+
in his <a href="http://craftingruby.com/posts/2015/06/29/query-objects-through-scopes.html">blog
|
|
487
|
+
post</a>.</p>
|
|
387
488
|
|
|
388
489
|
<h2 id="copyright">Copyright</h2>
|
|
389
490
|
|
|
390
|
-
<p>Copyright © 2016 -
|
|
491
|
+
<p>Copyright © 2016 - 2026 Sitrox. See <code>LICENSE</code> for further details.</p>
|
|
391
492
|
</div></div>
|
|
392
493
|
|
|
393
494
|
<div id="footer">
|
|
394
|
-
Generated on
|
|
395
|
-
<a href="
|
|
396
|
-
0.9.
|
|
495
|
+
Generated on Mon Jan 5 14:06:48 2026 by
|
|
496
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
497
|
+
0.9.37 (ruby-3.3.5).
|
|
397
498
|
</div>
|
|
398
499
|
|
|
399
500
|
</div>
|