inquery 1.1.0 → 1.1.1

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.
@@ -119,7 +119,7 @@
119
119
  </div>
120
120
 
121
121
  <div id="footer">
122
- Generated on Mon Jan 5 14:06:48 2026 by
122
+ Generated on Mon Jun 15 10:47:42 2026 by
123
123
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
124
124
  0.9.37 (ruby-3.3.5).
125
125
  </div>
@@ -179,7 +179,7 @@
179
179
  </div>
180
180
 
181
181
  <div id="footer">
182
- Generated on Mon Jan 5 14:06:48 2026 by
182
+ Generated on Mon Jun 15 10:47:42 2026 by
183
183
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
184
184
  0.9.37 (ruby-3.3.5).
185
185
  </div>
@@ -326,7 +326,7 @@
326
326
  </div>
327
327
 
328
328
  <div id="footer">
329
- Generated on Mon Jan 5 14:06:48 2026 by
329
+ Generated on Mon Jun 15 10:47:42 2026 by
330
330
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
331
331
  0.9.37 (ruby-3.3.5).
332
332
  </div>
@@ -306,7 +306,7 @@
306
306
  </div>
307
307
 
308
308
  <div id="footer">
309
- Generated on Mon Jan 5 14:06:48 2026 by
309
+ Generated on Mon Jun 15 10:47:42 2026 by
310
310
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
311
311
  0.9.37 (ruby-3.3.5).
312
312
  </div>
@@ -116,7 +116,7 @@
116
116
  </div>
117
117
 
118
118
  <div id="footer">
119
- Generated on Mon Jan 5 14:06:48 2026 by
119
+ Generated on Mon Jun 15 10:47:42 2026 by
120
120
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
121
121
  0.9.37 (ruby-3.3.5).
122
122
  </div>
@@ -107,7 +107,7 @@
107
107
  </div>
108
108
 
109
109
  <div id="footer">
110
- Generated on Mon Jan 5 14:06:48 2026 by
110
+ Generated on Mon Jun 15 10:47:42 2026 by
111
111
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
112
112
  0.9.37 (ruby-3.3.5).
113
113
  </div>
@@ -646,7 +646,7 @@ new(relation, params) - Uses provided relation and params
646
646
  </div>
647
647
 
648
648
  <div id="footer">
649
- Generated on Mon Jan 5 14:06:48 2026 by
649
+ Generated on Mon Jun 15 10:47:42 2026 by
650
650
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
651
651
  0.9.37 (ruby-3.3.5).
652
652
  </div>
@@ -1107,7 +1107,7 @@
1107
1107
  </div>
1108
1108
 
1109
1109
  <div id="footer">
1110
- Generated on Mon Jan 5 14:06:48 2026 by
1110
+ Generated on Mon Jun 15 10:47:42 2026 by
1111
1111
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1112
1112
  0.9.37 (ruby-3.3.5).
1113
1113
  </div>
data/doc/Inquery.html CHANGED
@@ -224,7 +224,7 @@
224
224
  </div>
225
225
 
226
226
  <div id="footer">
227
- Generated on Mon Jan 5 14:06:48 2026 by
227
+ Generated on Mon Jun 15 10:47:42 2026 by
228
228
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
229
229
  0.9.37 (ruby-3.3.5).
230
230
  </div>
data/doc/_index.html CHANGED
@@ -255,7 +255,7 @@
255
255
  </div>
256
256
 
257
257
  <div id="footer">
258
- Generated on Mon Jan 5 14:06:48 2026 by
258
+ Generated on Mon Jun 15 10:47:42 2026 by
259
259
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
260
260
  0.9.37 (ruby-3.3.5).
261
261
  </div>
data/doc/class_list.html CHANGED
@@ -46,7 +46,7 @@
46
46
 
47
47
  <ul id="full_list" class="class">
48
48
  <li id="object_" class="odd"><div class="item" style="padding-left:30px"><span class='object_link'><a href="top-level-namespace.html" title="Top Level Namespace (root)">Top Level Namespace</a></span></div></li>
49
- <li id='object_Inquery' class='even'><div class='item' style='padding-left:30px'><a tabindex='0' class='toggle' role='button' aria-label='Inquery child nodes' aria-expanded='false' aria-controls='object_Inquery'></a> <span class='object_link'><a href="Inquery.html" title="Inquery (module)">Inquery</a></span><small class='search_info'>Top Level Namespace</small></div><div aria-labelledby='object_Inquery'><ul><li id='object_Inquery::Exceptions' class='collapsed odd'><div class='item' style='padding-left:45px'><a tabindex='0' class='toggle' role='button' aria-label='Exceptions child nodes' aria-expanded='false' aria-controls='object_Inquery::Exceptions'></a> <span class='object_link'><a href="Inquery/Exceptions.html" title="Inquery::Exceptions (module)">Exceptions</a></span><small class='search_info'>Inquery</small></div><div aria-labelledby='object_Inquery::Exceptions'><ul><li id='object_Inquery::Exceptions::Base' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Inquery/Exceptions/Base.html" title="Inquery::Exceptions::Base (class)">Base</a></span> &lt; StandardError<small class='search_info'>Inquery::Exceptions</small></div></li><li id='object_Inquery::Exceptions::InvalidRelation' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Inquery/Exceptions/InvalidRelation.html" title="Inquery::Exceptions::InvalidRelation (class)">InvalidRelation</a></span> &lt; Base<small class='search_info'>Inquery::Exceptions</small></div></li><li id='object_Inquery::Exceptions::UnknownCallSignature' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Inquery/Exceptions/UnknownCallSignature.html" title="Inquery::Exceptions::UnknownCallSignature (class)">UnknownCallSignature</a></span> &lt; Base<small class='search_info'>Inquery::Exceptions</small></div></li></ul></div></li><li id='object_Inquery::MethodAccessibleHash' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Inquery/MethodAccessibleHash.html" title="Inquery::MethodAccessibleHash (class)">MethodAccessibleHash</a></span> &lt; Hash<small class='search_info'>Inquery</small></div></li><li id='object_Inquery::Mixins' class='collapsed odd'><div class='item' style='padding-left:45px'><a tabindex='0' class='toggle' role='button' aria-label='Mixins child nodes' aria-expanded='false' aria-controls='object_Inquery::Mixins'></a> <span class='object_link'><a href="Inquery/Mixins.html" title="Inquery::Mixins (module)">Mixins</a></span><small class='search_info'>Inquery</small></div><div aria-labelledby='object_Inquery::Mixins'><ul><li id='object_Inquery::Mixins::RawSqlUtils' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Inquery/Mixins/RawSqlUtils.html" title="Inquery::Mixins::RawSqlUtils (module)">RawSqlUtils</a></span><small class='search_info'>Inquery::Mixins</small></div></li><li id='object_Inquery::Mixins::RelationValidation' class='collapsed'><div class='item' style='padding-left:60px'><a tabindex='0' class='toggle' role='button' aria-label='RelationValidation child nodes' aria-expanded='false' aria-controls='object_Inquery::Mixins::RelationValidation'></a> <span class='object_link'><a href="Inquery/Mixins/RelationValidation.html" title="Inquery::Mixins::RelationValidation (module)">RelationValidation</a></span><small class='search_info'>Inquery::Mixins</small></div><div aria-labelledby='object_Inquery::Mixins::RelationValidation'><ul><li id='object_Inquery::Mixins::RelationValidation::ClassMethods' class='collapsed'><div class='item' style='padding-left:75px'><span class='object_link'><a href="Inquery/Mixins/RelationValidation/ClassMethods.html" title="Inquery::Mixins::RelationValidation::ClassMethods (module)">ClassMethods</a></span><small class='search_info'>Inquery::Mixins::RelationValidation</small></div></li></ul></div></li><li id='object_Inquery::Mixins::SchemaValidation' class='collapsed'><div class='item' style='padding-left:60px'><a tabindex='0' class='toggle' role='button' aria-label='SchemaValidation child nodes' aria-expanded='false' aria-controls='object_Inquery::Mixins::SchemaValidation'></a> <span class='object_link'><a href="Inquery/Mixins/SchemaValidation.html" title="Inquery::Mixins::SchemaValidation (module)">SchemaValidation</a></span><small class='search_info'>Inquery::Mixins</small></div><div aria-labelledby='object_Inquery::Mixins::SchemaValidation'><ul><li id='object_Inquery::Mixins::SchemaValidation::ClassMethods' class='collapsed'><div class='item' style='padding-left:75px'><span class='object_link'><a href="Inquery/Mixins/SchemaValidation/ClassMethods.html" title="Inquery::Mixins::SchemaValidation::ClassMethods (module)">ClassMethods</a></span><small class='search_info'>Inquery::Mixins::SchemaValidation</small></div></li></ul></div></li></ul></div></li><li id='object_Inquery::Query' class='collapsed even'><div class='item' style='padding-left:45px'><a tabindex='0' class='toggle' role='button' aria-label='Query child nodes' aria-expanded='false' aria-controls='object_Inquery::Query'></a> <span class='object_link'><a href="Inquery/Query.html" title="Inquery::Query (class)">Query</a></span> &lt; Object<small class='search_info'>Inquery</small></div><div aria-labelledby='object_Inquery::Query'><ul><li id='object_Inquery::Query::Chainable' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Inquery/Query/Chainable.html" title="Inquery::Query::Chainable (class)">Chainable</a></span> &lt; Query<small class='search_info'>Inquery::Query</small></div></li></ul></div></li></ul></div></li>
49
+ <li id='object_Inquery' class='even'><div class='item' style='padding-left:30px'><a tabindex='0' class='toggle' role='button' aria-label='Inquery child nodes' aria-expanded='false' aria-controls='object_Inquery'></a> <span class='object_link'><a href="Inquery.html" title="Inquery (module)">Inquery</a></span><small class='search_info'>Top Level Namespace</small></div><div aria-labelledby='object_Inquery'><ul><li id='object_Inquery::Exceptions' class='collapsed odd'><div class='item' style='padding-left:45px'><a tabindex='0' class='toggle' role='button' aria-label='Exceptions child nodes' aria-expanded='false' aria-controls='object_Inquery::Exceptions'></a> <span class='object_link'><a href="Inquery/Exceptions.html" title="Inquery::Exceptions (module)">Exceptions</a></span><small class='search_info'>Inquery</small></div><div aria-labelledby='object_Inquery::Exceptions'><ul><li id='object_Inquery::Exceptions::Base' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Inquery/Exceptions/Base.html" title="Inquery::Exceptions::Base (class)">Base</a></span> &lt; StandardError<small class='search_info'>Inquery::Exceptions</small></div></li><li id='object_Inquery::Exceptions::InvalidRelation' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Inquery/Exceptions/InvalidRelation.html" title="Inquery::Exceptions::InvalidRelation (class)">InvalidRelation</a></span> &lt; Base<small class='search_info'>Inquery::Exceptions</small></div></li><li id='object_Inquery::Exceptions::UnknownCallSignature' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Inquery/Exceptions/UnknownCallSignature.html" title="Inquery::Exceptions::UnknownCallSignature (class)">UnknownCallSignature</a></span> &lt; Base<small class='search_info'>Inquery::Exceptions</small></div></li></ul></div></li><li id='object_Inquery::MethodAccessibleHash' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Inquery/MethodAccessibleHash.html" title="Inquery::MethodAccessibleHash (class)">MethodAccessibleHash</a></span> &lt; Object<small class='search_info'>Inquery</small></div></li><li id='object_Inquery::Mixins' class='collapsed odd'><div class='item' style='padding-left:45px'><a tabindex='0' class='toggle' role='button' aria-label='Mixins child nodes' aria-expanded='false' aria-controls='object_Inquery::Mixins'></a> <span class='object_link'><a href="Inquery/Mixins.html" title="Inquery::Mixins (module)">Mixins</a></span><small class='search_info'>Inquery</small></div><div aria-labelledby='object_Inquery::Mixins'><ul><li id='object_Inquery::Mixins::RawSqlUtils' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Inquery/Mixins/RawSqlUtils.html" title="Inquery::Mixins::RawSqlUtils (module)">RawSqlUtils</a></span><small class='search_info'>Inquery::Mixins</small></div></li><li id='object_Inquery::Mixins::RelationValidation' class='collapsed'><div class='item' style='padding-left:60px'><a tabindex='0' class='toggle' role='button' aria-label='RelationValidation child nodes' aria-expanded='false' aria-controls='object_Inquery::Mixins::RelationValidation'></a> <span class='object_link'><a href="Inquery/Mixins/RelationValidation.html" title="Inquery::Mixins::RelationValidation (module)">RelationValidation</a></span><small class='search_info'>Inquery::Mixins</small></div><div aria-labelledby='object_Inquery::Mixins::RelationValidation'><ul><li id='object_Inquery::Mixins::RelationValidation::ClassMethods' class='collapsed'><div class='item' style='padding-left:75px'><span class='object_link'><a href="Inquery/Mixins/RelationValidation/ClassMethods.html" title="Inquery::Mixins::RelationValidation::ClassMethods (module)">ClassMethods</a></span><small class='search_info'>Inquery::Mixins::RelationValidation</small></div></li></ul></div></li><li id='object_Inquery::Mixins::SchemaValidation' class='collapsed'><div class='item' style='padding-left:60px'><a tabindex='0' class='toggle' role='button' aria-label='SchemaValidation child nodes' aria-expanded='false' aria-controls='object_Inquery::Mixins::SchemaValidation'></a> <span class='object_link'><a href="Inquery/Mixins/SchemaValidation.html" title="Inquery::Mixins::SchemaValidation (module)">SchemaValidation</a></span><small class='search_info'>Inquery::Mixins</small></div><div aria-labelledby='object_Inquery::Mixins::SchemaValidation'><ul><li id='object_Inquery::Mixins::SchemaValidation::ClassMethods' class='collapsed'><div class='item' style='padding-left:75px'><span class='object_link'><a href="Inquery/Mixins/SchemaValidation/ClassMethods.html" title="Inquery::Mixins::SchemaValidation::ClassMethods (module)">ClassMethods</a></span><small class='search_info'>Inquery::Mixins::SchemaValidation</small></div></li></ul></div></li></ul></div></li><li id='object_Inquery::Query' class='collapsed even'><div class='item' style='padding-left:45px'><a tabindex='0' class='toggle' role='button' aria-label='Query child nodes' aria-expanded='false' aria-controls='object_Inquery::Query'></a> <span class='object_link'><a href="Inquery/Query.html" title="Inquery::Query (class)">Query</a></span> &lt; Object<small class='search_info'>Inquery</small></div><div aria-labelledby='object_Inquery::Query'><ul><li id='object_Inquery::Query::Chainable' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Inquery/Query/Chainable.html" title="Inquery::Query::Chainable (class)">Chainable</a></span> &lt; Query<small class='search_info'>Inquery::Query</small></div></li></ul></div></li></ul></div></li>
50
50
 
51
51
  </ul>
52
52
  </div>
data/doc/file.README.html CHANGED
@@ -416,8 +416,11 @@ raised if the given params do not match the schema specified. See documentation
416
416
  of the Schemacop Gem for more information on how to specify schemas.</p>
417
417
 
418
418
  <p>Parameters can be accessed using either <code>params</code> or <code>osparams</code>. The method
419
- <code>osparams</code> automatically wraps <code>params</code> in an <code>OpenStruct</code> for more convenient
420
- access.</p>
419
+ <code>osparams</code> wraps <code>params</code> in a <code>MethodAccessibleHash</code>, allowing access to the
420
+ top-level parameters via dot notation (e.g. <code>osparams.search</code>) in addition to
421
+ the usual <code>[]</code> access. Unlike a plain <code>Hash</code>, a <code>MethodAccessibleHash</code> does not
422
+ expose the <code>Hash</code>/<code>Enumerable</code> API, so keys named like Hash methods (e.g.
423
+ <code>count</code>, <code>select</code>, <code>zip</code>) still return their stored value.</p>
421
424
 
422
425
  <pre class="code ruby"><code class="ruby"><span class='kw'>class</span> <span class='const'>SomeQueryClass</span> <span class='op'>&lt;</span> <span class='const'><span class='object_link'><a href="Inquery.html" title="Inquery (module)">Inquery</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Inquery/Query.html" title="Inquery::Query (class)">Query</a></span></span>
423
426
  <span class='kw'>def</span> <span class='id identifier rubyid_run'>run</span>
@@ -492,7 +495,7 @@ post</a>.</p>
492
495
  </div></div>
493
496
 
494
497
  <div id="footer">
495
- Generated on Mon Jan 5 14:06:48 2026 by
498
+ Generated on Mon Jun 15 10:47:42 2026 by
496
499
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
497
500
  0.9.37 (ruby-3.3.5).
498
501
  </div>
data/doc/index.html CHANGED
@@ -416,8 +416,11 @@ raised if the given params do not match the schema specified. See documentation
416
416
  of the Schemacop Gem for more information on how to specify schemas.</p>
417
417
 
418
418
  <p>Parameters can be accessed using either <code>params</code> or <code>osparams</code>. The method
419
- <code>osparams</code> automatically wraps <code>params</code> in an <code>OpenStruct</code> for more convenient
420
- access.</p>
419
+ <code>osparams</code> wraps <code>params</code> in a <code>MethodAccessibleHash</code>, allowing access to the
420
+ top-level parameters via dot notation (e.g. <code>osparams.search</code>) in addition to
421
+ the usual <code>[]</code> access. Unlike a plain <code>Hash</code>, a <code>MethodAccessibleHash</code> does not
422
+ expose the <code>Hash</code>/<code>Enumerable</code> API, so keys named like Hash methods (e.g.
423
+ <code>count</code>, <code>select</code>, <code>zip</code>) still return their stored value.</p>
421
424
 
422
425
  <pre class="code ruby"><code class="ruby"><span class='kw'>class</span> <span class='const'>SomeQueryClass</span> <span class='op'>&lt;</span> <span class='const'><span class='object_link'><a href="Inquery.html" title="Inquery (module)">Inquery</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Inquery/Query.html" title="Inquery::Query (class)">Query</a></span></span>
423
426
  <span class='kw'>def</span> <span class='id identifier rubyid_run'>run</span>
@@ -492,7 +495,7 @@ post</a>.</p>
492
495
  </div></div>
493
496
 
494
497
  <div id="footer">
495
- Generated on Mon Jan 5 14:06:48 2026 by
498
+ Generated on Mon Jun 15 10:47:42 2026 by
496
499
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
497
500
  0.9.37 (ruby-3.3.5).
498
501
  </div>
data/doc/method_list.html CHANGED
@@ -49,15 +49,31 @@
49
49
 
50
50
  <li class="odd ">
51
51
  <div class="item">
52
- <span class='object_link'><a href="Inquery/Query.html#call-class_method" title="Inquery::Query.call (method)">call</a></span>
53
- <small>Inquery::Query</small>
52
+ <span class='object_link'><a href="Inquery/MethodAccessibleHash.html#==-instance_method" title="Inquery::MethodAccessibleHash#== (method)">#==</a></span>
53
+ <small>Inquery::MethodAccessibleHash</small>
54
54
  </div>
55
55
  </li>
56
56
 
57
57
 
58
58
  <li class="even ">
59
59
  <div class="item">
60
- <span class='object_link'><a href="Inquery/Query.html#call-instance_method" title="Inquery::Query#call (method)">#call</a></span>
60
+ <span class='object_link'><a href="Inquery/MethodAccessibleHash.html#[]-instance_method" title="Inquery::MethodAccessibleHash#[] (method)">#[]</a></span>
61
+ <small>Inquery::MethodAccessibleHash</small>
62
+ </div>
63
+ </li>
64
+
65
+
66
+ <li class="odd ">
67
+ <div class="item">
68
+ <span class='object_link'><a href="Inquery/MethodAccessibleHash.html#[]=-instance_method" title="Inquery::MethodAccessibleHash#[]= (method)">#[]=</a></span>
69
+ <small>Inquery::MethodAccessibleHash</small>
70
+ </div>
71
+ </li>
72
+
73
+
74
+ <li class="even ">
75
+ <div class="item">
76
+ <span class='object_link'><a href="Inquery/Query.html#call-class_method" title="Inquery::Query.call (method)">call</a></span>
61
77
  <small>Inquery::Query</small>
62
78
  </div>
63
79
  </li>
@@ -73,7 +89,7 @@
73
89
 
74
90
  <li class="even ">
75
91
  <div class="item">
76
- <span class='object_link'><a href="Inquery/Query.html#connection-instance_method" title="Inquery::Query#connection (method)">#connection</a></span>
92
+ <span class='object_link'><a href="Inquery/Query.html#call-instance_method" title="Inquery::Query#call (method)">#call</a></span>
77
93
  <small>Inquery::Query</small>
78
94
  </div>
79
95
  </li>
@@ -89,21 +105,29 @@
89
105
 
90
106
  <li class="even ">
91
107
  <div class="item">
92
- <span class='object_link'><a href="Inquery/Query/Chainable.html#initialize-instance_method" title="Inquery::Query::Chainable#initialize (method)">#initialize</a></span>
93
- <small>Inquery::Query::Chainable</small>
108
+ <span class='object_link'><a href="Inquery/Query.html#connection-instance_method" title="Inquery::Query#connection (method)">#connection</a></span>
109
+ <small>Inquery::Query</small>
94
110
  </div>
95
111
  </li>
96
112
 
97
113
 
98
114
  <li class="odd ">
99
115
  <div class="item">
100
- <span class='object_link'><a href="Inquery/MethodAccessibleHash.html#initialize-instance_method" title="Inquery::MethodAccessibleHash#initialize (method)">#initialize</a></span>
116
+ <span class='object_link'><a href="Inquery/MethodAccessibleHash.html#freeze-instance_method" title="Inquery::MethodAccessibleHash#freeze (method)">#freeze</a></span>
101
117
  <small>Inquery::MethodAccessibleHash</small>
102
118
  </div>
103
119
  </li>
104
120
 
105
121
 
106
122
  <li class="even ">
123
+ <div class="item">
124
+ <span class='object_link'><a href="Inquery/Query/Chainable.html#initialize-instance_method" title="Inquery::Query::Chainable#initialize (method)">#initialize</a></span>
125
+ <small>Inquery::Query::Chainable</small>
126
+ </div>
127
+ </li>
128
+
129
+
130
+ <li class="odd ">
107
131
  <div class="item">
108
132
  <span class='object_link'><a href="Inquery/Query.html#initialize-instance_method" title="Inquery::Query#initialize (method)">#initialize</a></span>
109
133
  <small>Inquery::Query</small>
@@ -111,6 +135,14 @@
111
135
  </li>
112
136
 
113
137
 
138
+ <li class="even ">
139
+ <div class="item">
140
+ <span class='object_link'><a href="Inquery/MethodAccessibleHash.html#initialize-instance_method" title="Inquery::MethodAccessibleHash#initialize (method)">#initialize</a></span>
141
+ <small>Inquery::MethodAccessibleHash</small>
142
+ </div>
143
+ </li>
144
+
145
+
114
146
  <li class="odd ">
115
147
  <div class="item">
116
148
  <span class='object_link'><a href="Inquery/MethodAccessibleHash.html#merge-instance_method" title="Inquery::MethodAccessibleHash#merge (method)">#merge</a></span>
@@ -177,7 +209,7 @@
177
209
 
178
210
  <li class="odd ">
179
211
  <div class="item">
180
- <span class='object_link'><a href="Inquery/Query.html#run-instance_method" title="Inquery::Query#run (method)">#run</a></span>
212
+ <span class='object_link'><a href="Inquery/Query.html#run-class_method" title="Inquery::Query.run (method)">run</a></span>
181
213
  <small>Inquery::Query</small>
182
214
  </div>
183
215
  </li>
@@ -185,7 +217,7 @@
185
217
 
186
218
  <li class="even ">
187
219
  <div class="item">
188
- <span class='object_link'><a href="Inquery/Query.html#run-class_method" title="Inquery::Query.run (method)">run</a></span>
220
+ <span class='object_link'><a href="Inquery/Query.html#run-instance_method" title="Inquery::Query#run (method)">#run</a></span>
189
221
  <small>Inquery::Query</small>
190
222
  </div>
191
223
  </li>
@@ -223,6 +255,22 @@
223
255
  </li>
224
256
 
225
257
 
258
+ <li class="odd ">
259
+ <div class="item">
260
+ <span class='object_link'><a href="Inquery/MethodAccessibleHash.html#to_h-instance_method" title="Inquery::MethodAccessibleHash#to_h (method)">#to_h</a></span>
261
+ <small>Inquery::MethodAccessibleHash</small>
262
+ </div>
263
+ </li>
264
+
265
+
266
+ <li class="even ">
267
+ <div class="item">
268
+ <span class='object_link'><a href="Inquery/MethodAccessibleHash.html#to_s-instance_method" title="Inquery::MethodAccessibleHash#to_s (method)">#to_s</a></span>
269
+ <small>Inquery::MethodAccessibleHash</small>
270
+ </div>
271
+ </li>
272
+
273
+
226
274
  <li class="odd ">
227
275
  <div class="item">
228
276
  <span class='object_link'><a href="Inquery/Mixins/RelationValidation.html#validate_relation!-instance_method" title="Inquery::Mixins::RelationValidation#validate_relation! (method)">#validate_relation!</a></span>
@@ -100,7 +100,7 @@
100
100
  </div>
101
101
 
102
102
  <div id="footer">
103
- Generated on Mon Jan 5 14:06:48 2026 by
103
+ Generated on Mon Jun 15 10:47:42 2026 by
104
104
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
105
105
  0.9.37 (ruby-3.3.5).
106
106
  </div>
data/inquery.gemspec CHANGED
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: inquery 1.1.0 ruby lib
2
+ # stub: inquery 1.1.1 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "inquery".freeze
6
- s.version = "1.1.0".freeze
6
+ s.version = "1.1.1".freeze
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib".freeze]
10
10
  s.authors = ["Sitrox".freeze]
11
- s.date = "2026-01-05"
11
+ s.date = "2026-06-15"
12
12
  s.files = [".github/workflows/rubocop.yml".freeze, ".github/workflows/ruby.yml".freeze, ".gitignore".freeze, ".releaser_config".freeze, ".rubocop.yml".freeze, "Appraisals".freeze, "CHANGELOG.md".freeze, "Gemfile".freeze, "Gemfile.lock".freeze, "LICENSE".freeze, "MIGRATION.md".freeze, "README.md".freeze, "RUBY_VERSION".freeze, "Rakefile".freeze, "VERSION".freeze, "doc/Inquery.html".freeze, "doc/Inquery/Exceptions.html".freeze, "doc/Inquery/Exceptions/Base.html".freeze, "doc/Inquery/Exceptions/InvalidRelation.html".freeze, "doc/Inquery/Exceptions/UnknownCallSignature.html".freeze, "doc/Inquery/MethodAccessibleHash.html".freeze, "doc/Inquery/Mixins.html".freeze, "doc/Inquery/Mixins/RawSqlUtils.html".freeze, "doc/Inquery/Mixins/RelationValidation.html".freeze, "doc/Inquery/Mixins/RelationValidation/ClassMethods.html".freeze, "doc/Inquery/Mixins/SchemaValidation.html".freeze, "doc/Inquery/Mixins/SchemaValidation/ClassMethods.html".freeze, "doc/Inquery/Query.html".freeze, "doc/Inquery/Query/Chainable.html".freeze, "doc/_index.html".freeze, "doc/class_list.html".freeze, "doc/css/common.css".freeze, "doc/css/full_list.css".freeze, "doc/css/style.css".freeze, "doc/file.README.html".freeze, "doc/file_list.html".freeze, "doc/frames.html".freeze, "doc/index.html".freeze, "doc/js/app.js".freeze, "doc/js/full_list.js".freeze, "doc/js/jquery.js".freeze, "doc/method_list.html".freeze, "doc/top-level-namespace.html".freeze, "gemfiles/rails_5.2.gemfile".freeze, "gemfiles/rails_6.0.gemfile".freeze, "gemfiles/rails_6.1.gemfile".freeze, "gemfiles/rails_7.0.gemfile".freeze, "gemfiles/rails_7.1.gemfile".freeze, "gemfiles/rails_7.2.gemfile".freeze, "gemfiles/rails_8.0.gemfile".freeze, "gemfiles/rails_8.1.gemfile".freeze, "inquery.gemspec".freeze, "lib/inquery.rb".freeze, "lib/inquery/exceptions.rb".freeze, "lib/inquery/method_accessible_hash.rb".freeze, "lib/inquery/mixins/raw_sql_utils.rb".freeze, "lib/inquery/mixins/relation_validation.rb".freeze, "lib/inquery/mixins/schema_validation.rb".freeze, "lib/inquery/query.rb".freeze, "lib/inquery/query/chainable.rb".freeze, "test/db/models.rb".freeze, "test/db/schema.rb".freeze, "test/inquery/error_handling_test.rb".freeze, "test/inquery/method_accessible_hash_test.rb".freeze, "test/inquery/mixins/raw_sql_utils_test.rb".freeze, "test/inquery/query/chainable_test.rb".freeze, "test/inquery/query_test.rb".freeze, "test/queries/group/fetch_as_json.rb".freeze, "test/queries/group/fetch_green.rb".freeze, "test/queries/group/fetch_red.rb".freeze, "test/queries/group/filter_with_color.rb".freeze, "test/queries/user/fetch_all.rb".freeze, "test/queries/user/fetch_in_group.rb".freeze, "test/queries/user/fetch_in_group_rel.rb".freeze, "test/test_helper.rb".freeze]
13
13
  s.homepage = "https://github.com/sitrox/inquery".freeze
14
14
  s.rubygems_version = "3.5.18".freeze
@@ -1,6 +1,13 @@
1
1
  module Inquery
2
- # A safe alternative for OpenStruct in Ruby. It behaves exactly the same, but
3
- # does not define methods on-the-fly but uses `method_missing` instead.
2
+ # A safe alternative for `OpenStruct` in Ruby. It provides convenient method
3
+ # access to a set of key-value pairs, just like `OpenStruct`, but uses
4
+ # `method_missing` instead of defining methods on-the-fly.
5
+ #
6
+ # Unlike a `Hash`, this class deliberately does *not* inherit from `Hash` (or
7
+ # include `Enumerable`). If it did, keys whose names collide with `Hash` /
8
+ # `Enumerable` methods (e.g. `group_by`, `count`, `zip`, `select`, ...) would
9
+ # invoke the inherited method instead of returning the stored value, because
10
+ # `method_missing` is only called for methods that are not already defined.
4
11
  #
5
12
  # Usage example:
6
13
  #
@@ -9,37 +16,115 @@ module Inquery
9
16
  # options = MethodAccessibleHash.new(default_options)
10
17
  # options[:color] = :green
11
18
  # options.foo # => :bar
12
- # options.color # => green
19
+ # options.color # => :green
13
20
  # ```
14
- class MethodAccessibleHash < ::Hash
21
+ class MethodAccessibleHash
22
+ # Methods that participate in Ruby's implicit type-coercion protocol. We
23
+ # must neither pretend to respond to these (`respond_to_missing?`) nor
24
+ # fabricate a `nil` value for them (`method_missing`). Otherwise constructs
25
+ # such as `**hash`, `Hash(obj)`, `Array(obj)` or Rails' implicit
26
+ # conversions would detect the method, call it, receive `nil` and raise a
27
+ # `TypeError`. Keys actually present under one of these names are still
28
+ # returned normally.
29
+ CONVERSION_METHODS = %i[to_ary to_a to_hash to_str to_int to_proc].freeze
30
+
15
31
  # Takes an optional hash as argument and constructs a new
16
- # MethodAccessibleHash.
32
+ # MethodAccessibleHash. Keys are symbolized.
17
33
  def initialize(hash = {})
18
- super()
34
+ @table = {}
35
+ (hash || {}).each do |key, value|
36
+ @table[key.to_sym] = value
37
+ end
38
+ end
19
39
 
20
- hash.each do |key, value|
21
- self[key.to_sym] = value
40
+ # Returns the value stored under the given key. Keys are accessed
41
+ # indifferently as the storage is symbolized.
42
+ def [](key)
43
+ @table[key.to_sym]
44
+ end
45
+
46
+ # Stores the given value under the given (symbolized) key. Modifying a
47
+ # frozen instance raises a `FrozenError`, because `@table` is frozen
48
+ # alongside the instance (see `freeze` and `initialize_copy`).
49
+ def []=(key, value)
50
+ @table[key.to_sym] = value
51
+ end
52
+
53
+ # Returns a (shallow) copy of the underlying data as a plain Hash with
54
+ # symbol keys.
55
+ def to_h
56
+ @table.dup
57
+ end
58
+
59
+ # Returns a new MethodAccessibleHash with the given hash merged in.
60
+ def merge(other = {})
61
+ self.class.new(to_h.merge(other.to_h.symbolize_keys))
62
+ end
63
+
64
+ # @private
65
+ def ==(other)
66
+ case other
67
+ when MethodAccessibleHash
68
+ to_h == other.to_h
69
+ when ::Hash
70
+ to_h == other.symbolize_keys
71
+ else
72
+ false
22
73
  end
23
74
  end
24
75
 
25
76
  # @private
26
- def merge(**hash)
27
- super(hash.symbolize_keys)
77
+ def to_s
78
+ @table.to_s
79
+ end
80
+ alias inspect to_s
81
+
82
+ # @private
83
+ def freeze
84
+ @table.freeze
85
+ super
28
86
  end
29
87
 
30
88
  # @private
31
89
  def method_missing(method, *args, &_block)
32
- if method.to_s.end_with?('=')
33
- name = method.to_s.gsub(/=$/, '')
34
- self[name.to_sym] = args.first
90
+ name = method.to_s
91
+ if name.end_with?('=')
92
+ self[name[0..-2].to_sym] = args.first
93
+ elsif CONVERSION_METHODS.include?(method) && !@table.key?(method)
94
+ super
35
95
  else
36
- self[method.to_sym]
96
+ @table[method.to_sym]
37
97
  end
38
98
  end
39
99
 
40
100
  # @private
41
- def respond_to_missing?(_method, _include_private = false)
101
+ def respond_to_missing?(method, _include_private = false)
102
+ return false if CONVERSION_METHODS.include?(method) && !@table.key?(method)
103
+
42
104
  true
43
105
  end
106
+
107
+ private
108
+
109
+ # @private
110
+ def initialize_copy(source)
111
+ super
112
+ # Give the copy its own data so `dup`/`clone` are independent of the
113
+ # source.
114
+ @table = source.to_h
115
+ end
116
+
117
+ # @private
118
+ def initialize_clone(source, **kwargs)
119
+ super
120
+ # Unlike `dup`, `clone` preserves the frozen state of the original. The
121
+ # frozen flag is only applied to the clone *after* this hook returns, so
122
+ # we cannot rely on `frozen?` here. Freeze the internal data based on the
123
+ # source (or the explicit `freeze:` keyword on Ruby >= 3.0) instead --
124
+ # otherwise a frozen clone would report `frozen? == true` yet stay
125
+ # mutable through `[]=`.
126
+ freeze = kwargs.fetch(:freeze, nil)
127
+ @table.freeze if freeze || (freeze.nil? && source.frozen?)
128
+ end
44
129
  end
45
130
  end