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.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rubocop.yml +1 -1
  3. data/.github/workflows/ruby.yml +24 -8
  4. data/.gitignore +2 -2
  5. data/.rubocop.yml +4 -0
  6. data/Appraisals +24 -4
  7. data/CHANGELOG.md +47 -1
  8. data/Gemfile +17 -1
  9. data/Gemfile.lock +125 -0
  10. data/LICENSE +1 -1
  11. data/MIGRATION.md +260 -0
  12. data/README.md +31 -9
  13. data/RUBY_VERSION +1 -1
  14. data/Rakefile +4 -11
  15. data/VERSION +1 -1
  16. data/doc/Inquery/Exceptions/Base.html +4 -4
  17. data/doc/Inquery/Exceptions/InvalidRelation.html +4 -4
  18. data/doc/Inquery/Exceptions/UnknownCallSignature.html +4 -4
  19. data/doc/Inquery/Exceptions.html +4 -4
  20. data/doc/Inquery/MethodAccessibleHash.html +431 -0
  21. data/doc/Inquery/Mixins/RawSqlUtils.html +17 -4
  22. data/doc/Inquery/Mixins/RelationValidation/ClassMethods.html +8 -7
  23. data/doc/Inquery/Mixins/RelationValidation.html +9 -8
  24. data/doc/Inquery/Mixins/SchemaValidation/ClassMethods.html +20 -6
  25. data/doc/Inquery/Mixins/SchemaValidation.html +4 -4
  26. data/doc/Inquery/Mixins.html +4 -4
  27. data/doc/Inquery/Query/Chainable.html +207 -90
  28. data/doc/Inquery/Query.html +401 -73
  29. data/doc/Inquery.html +121 -6
  30. data/doc/_index.html +12 -5
  31. data/doc/class_list.html +6 -3
  32. data/doc/css/full_list.css +3 -3
  33. data/doc/css/style.css +6 -0
  34. data/doc/file.README.html +118 -17
  35. data/doc/file_list.html +5 -2
  36. data/doc/frames.html +10 -5
  37. data/doc/index.html +118 -17
  38. data/doc/js/app.js +294 -264
  39. data/doc/js/full_list.js +30 -4
  40. data/doc/method_list.html +52 -17
  41. data/doc/top-level-namespace.html +4 -4
  42. data/gemfiles/rails_5.2.gemfile +1 -0
  43. data/gemfiles/rails_6.0.gemfile +1 -0
  44. data/gemfiles/rails_6.1.gemfile +1 -0
  45. data/gemfiles/rails_7.0.gemfile +1 -0
  46. data/gemfiles/{rails_5.1.gemfile → rails_7.1.gemfile} +2 -1
  47. data/gemfiles/rails_7.2.gemfile +8 -0
  48. data/gemfiles/rails_8.0.gemfile +8 -0
  49. data/gemfiles/rails_8.1.gemfile +8 -0
  50. data/inquery.gemspec +11 -34
  51. data/lib/inquery/method_accessible_hash.rb +45 -0
  52. data/lib/inquery/mixins/raw_sql_utils.rb +32 -6
  53. data/lib/inquery/mixins/relation_validation.rb +1 -1
  54. data/lib/inquery/mixins/schema_validation.rb +8 -1
  55. data/lib/inquery/query/chainable.rb +69 -27
  56. data/lib/inquery/query.rb +67 -14
  57. data/lib/inquery.rb +9 -0
  58. data/test/inquery/error_handling_test.rb +117 -0
  59. data/test/inquery/method_accessible_hash_test.rb +85 -0
  60. data/test/inquery/mixins/raw_sql_utils_test.rb +67 -0
  61. data/test/inquery/query/chainable_test.rb +78 -0
  62. data/test/inquery/query_test.rb +86 -0
  63. data/test/test_helper.rb +11 -0
  64. metadata +30 -129
  65. data/.yardopts +0 -1
data/doc/index.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  File: README
8
8
 
9
- &mdash; Documentation by YARD 0.9.27
9
+ &mdash; 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 with the following ruby versions:</p>
84
-
85
- <ul>
86
- <li>2.5.1</li>
87
- <li>2.6.2</li>
88
- <li>2.7.1</li>
89
- <li>3.0.1</li>
90
- </ul>
91
-
92
- <p>Other ruby versions might work but are not covered by our automated tests.</p>
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>schema</code> / <code>schema2</code> for version 2 and method <code>schema3</code> for version 3.</p>
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 post</a>.</p>
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 - 2022 Sitrox. See <code>LICENSE</code> for further details.</p>
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 Thu May 19 10:36:15 2022 by
395
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
396
- 0.9.27 (ruby-3.0.1).
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>