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/Rakefile
CHANGED
|
@@ -3,6 +3,7 @@ task :gemspec do
|
|
|
3
3
|
spec.name = 'inquery'
|
|
4
4
|
spec.version = File.read('VERSION').chomp
|
|
5
5
|
spec.authors = ['Sitrox']
|
|
6
|
+
spec.homepage = 'https://github.com/sitrox/inquery'
|
|
6
7
|
spec.summary = %(
|
|
7
8
|
A skeleton that allows extracting queries into atomic, reusable classes.
|
|
8
9
|
)
|
|
@@ -11,17 +12,9 @@ task :gemspec do
|
|
|
11
12
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
12
13
|
spec.require_paths = ['lib']
|
|
13
14
|
|
|
14
|
-
spec.
|
|
15
|
-
spec.
|
|
16
|
-
spec.
|
|
17
|
-
spec.add_development_dependency 'haml'
|
|
18
|
-
spec.add_development_dependency 'yard'
|
|
19
|
-
spec.add_development_dependency 'rubocop', '1.25'
|
|
20
|
-
spec.add_development_dependency 'redcarpet'
|
|
21
|
-
spec.add_dependency 'minitest'
|
|
22
|
-
spec.add_dependency 'activesupport'
|
|
23
|
-
spec.add_dependency 'activerecord'
|
|
24
|
-
spec.add_dependency 'schemacop', '~> 3.0.8'
|
|
15
|
+
spec.add_dependency 'activesupport', '>= 5.1'
|
|
16
|
+
spec.add_dependency 'activerecord', '>= 5.1'
|
|
17
|
+
spec.add_dependency 'schemacop', '>= 3.0.8', '< 4.0'
|
|
25
18
|
end
|
|
26
19
|
|
|
27
20
|
File.write('inquery.gemspec', gemspec.to_ruby.strip)
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0
|
|
1
|
+
1.1.0
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Exception: Inquery::Exceptions::Base
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.37
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
@@ -118,9 +118,9 @@
|
|
|
118
118
|
</div>
|
|
119
119
|
|
|
120
120
|
<div id="footer">
|
|
121
|
-
Generated on
|
|
122
|
-
<a href="
|
|
123
|
-
0.9.
|
|
121
|
+
Generated on Mon Jan 5 14:06:48 2026 by
|
|
122
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
123
|
+
0.9.37 (ruby-3.3.5).
|
|
124
124
|
</div>
|
|
125
125
|
|
|
126
126
|
</div>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Exception: Inquery::Exceptions::InvalidRelation
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.37
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
@@ -122,9 +122,9 @@
|
|
|
122
122
|
</div>
|
|
123
123
|
|
|
124
124
|
<div id="footer">
|
|
125
|
-
Generated on
|
|
126
|
-
<a href="
|
|
127
|
-
0.9.
|
|
125
|
+
Generated on Mon Jan 5 14:06:48 2026 by
|
|
126
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
127
|
+
0.9.37 (ruby-3.3.5).
|
|
128
128
|
</div>
|
|
129
129
|
|
|
130
130
|
</div>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Exception: Inquery::Exceptions::UnknownCallSignature
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.37
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
@@ -122,9 +122,9 @@
|
|
|
122
122
|
</div>
|
|
123
123
|
|
|
124
124
|
<div id="footer">
|
|
125
|
-
Generated on
|
|
126
|
-
<a href="
|
|
127
|
-
0.9.
|
|
125
|
+
Generated on Mon Jan 5 14:06:48 2026 by
|
|
126
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
127
|
+
0.9.37 (ruby-3.3.5).
|
|
128
128
|
</div>
|
|
129
129
|
|
|
130
130
|
</div>
|
data/doc/Inquery/Exceptions.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Module: Inquery::Exceptions
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.37
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
@@ -105,9 +105,9 @@
|
|
|
105
105
|
</div>
|
|
106
106
|
|
|
107
107
|
<div id="footer">
|
|
108
|
-
Generated on
|
|
109
|
-
<a href="
|
|
110
|
-
0.9.
|
|
108
|
+
Generated on Mon Jan 5 14:06:48 2026 by
|
|
109
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
110
|
+
0.9.37 (ruby-3.3.5).
|
|
111
111
|
</div>
|
|
112
112
|
|
|
113
113
|
</div>
|
|
@@ -0,0 +1,431 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>
|
|
7
|
+
Class: Inquery::MethodAccessibleHash
|
|
8
|
+
|
|
9
|
+
— Documentation by YARD 0.9.37
|
|
10
|
+
|
|
11
|
+
</title>
|
|
12
|
+
|
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
|
14
|
+
|
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
|
16
|
+
|
|
17
|
+
<script type="text/javascript">
|
|
18
|
+
pathId = "Inquery::MethodAccessibleHash";
|
|
19
|
+
relpath = '../';
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
|
24
|
+
|
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
</head>
|
|
29
|
+
<body>
|
|
30
|
+
<div class="nav_wrap">
|
|
31
|
+
<iframe id="nav" src="../class_list.html?1"></iframe>
|
|
32
|
+
<div id="resizer"></div>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div id="main" tabindex="-1">
|
|
36
|
+
<div id="header">
|
|
37
|
+
<div id="menu">
|
|
38
|
+
|
|
39
|
+
<a href="../_index.html">Index (M)</a> »
|
|
40
|
+
<span class='title'><span class='object_link'><a href="../Inquery.html" title="Inquery (module)">Inquery</a></span></span>
|
|
41
|
+
»
|
|
42
|
+
<span class="title">MethodAccessibleHash</span>
|
|
43
|
+
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<div id="search">
|
|
47
|
+
|
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
|
49
|
+
href="../class_list.html">
|
|
50
|
+
|
|
51
|
+
<svg width="24" height="24">
|
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
|
55
|
+
</svg>
|
|
56
|
+
</a>
|
|
57
|
+
|
|
58
|
+
</div>
|
|
59
|
+
<div class="clear"></div>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<div id="content"><h1>Class: Inquery::MethodAccessibleHash
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
</h1>
|
|
67
|
+
<div class="box_info">
|
|
68
|
+
|
|
69
|
+
<dl>
|
|
70
|
+
<dt>Inherits:</dt>
|
|
71
|
+
<dd>
|
|
72
|
+
<span class="inheritName">Hash</span>
|
|
73
|
+
|
|
74
|
+
<ul class="fullTree">
|
|
75
|
+
<li>Object</li>
|
|
76
|
+
|
|
77
|
+
<li class="next">Hash</li>
|
|
78
|
+
|
|
79
|
+
<li class="next">Inquery::MethodAccessibleHash</li>
|
|
80
|
+
|
|
81
|
+
</ul>
|
|
82
|
+
<a href="#" class="inheritanceTree">show all</a>
|
|
83
|
+
|
|
84
|
+
</dd>
|
|
85
|
+
</dl>
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
<dl>
|
|
98
|
+
<dt>Defined in:</dt>
|
|
99
|
+
<dd>lib/inquery/method_accessible_hash.rb</dd>
|
|
100
|
+
</dl>
|
|
101
|
+
|
|
102
|
+
</div>
|
|
103
|
+
|
|
104
|
+
<h2>Overview</h2><div class="docstring">
|
|
105
|
+
<div class="discussion">
|
|
106
|
+
|
|
107
|
+
<p>A safe alternative for OpenStruct in Ruby. It behaves exactly the same, but does not define methods on-the-fly but uses ‘method_missing` instead.</p>
|
|
108
|
+
|
|
109
|
+
<p>Usage example:</p>
|
|
110
|
+
|
|
111
|
+
<p>“‘ruby default_options = { foo: :bar } options = MethodAccessibleHash.new(default_options) <a href=":color">options</a> = :green options.foo # => :bar options.color # => green “`</p>
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
<div class="tags">
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
</div>
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
<h2>
|
|
128
|
+
Instance Method Summary
|
|
129
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
130
|
+
</h2>
|
|
131
|
+
|
|
132
|
+
<ul class="summary">
|
|
133
|
+
|
|
134
|
+
<li class="public ">
|
|
135
|
+
<span class="summary_signature">
|
|
136
|
+
|
|
137
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(hash = {}) ⇒ MethodAccessibleHash </a>
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
</span>
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
<span class="note title constructor">constructor</span>
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
<span class="summary_desc"><div class='inline'>
|
|
154
|
+
<p>Takes an optional hash as argument and constructs a new MethodAccessibleHash.</p>
|
|
155
|
+
</div></span>
|
|
156
|
+
|
|
157
|
+
</li>
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
<li class="public ">
|
|
161
|
+
<span class="summary_signature">
|
|
162
|
+
|
|
163
|
+
<a href="#merge-instance_method" title="#merge (instance method)">#<strong>merge</strong>(**hash) ⇒ Object </a>
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
</span>
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
178
|
+
|
|
179
|
+
</li>
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
<li class="public ">
|
|
183
|
+
<span class="summary_signature">
|
|
184
|
+
|
|
185
|
+
<a href="#method_missing-instance_method" title="#method_missing (instance method)">#<strong>method_missing</strong>(method, *args, &_block) ⇒ Object </a>
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
</span>
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
200
|
+
|
|
201
|
+
</li>
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
<li class="public ">
|
|
205
|
+
<span class="summary_signature">
|
|
206
|
+
|
|
207
|
+
<a href="#respond_to_missing%3F-instance_method" title="#respond_to_missing? (instance method)">#<strong>respond_to_missing?</strong>(_method, _include_private = false) ⇒ Boolean </a>
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
</span>
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
222
|
+
|
|
223
|
+
</li>
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
</ul>
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
<div id="constructor_details" class="method_details_list">
|
|
231
|
+
<h2>Constructor Details</h2>
|
|
232
|
+
|
|
233
|
+
<div class="method_details first">
|
|
234
|
+
<h3 class="signature first" id="initialize-instance_method">
|
|
235
|
+
|
|
236
|
+
#<strong>initialize</strong>(hash = {}) ⇒ <tt><span class='object_link'><a href="" title="Inquery::MethodAccessibleHash (class)">MethodAccessibleHash</a></span></tt>
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
</h3><div class="docstring">
|
|
243
|
+
<div class="discussion">
|
|
244
|
+
|
|
245
|
+
<p>Takes an optional hash as argument and constructs a new MethodAccessibleHash.</p>
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
</div>
|
|
249
|
+
</div>
|
|
250
|
+
<div class="tags">
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
</div><table class="source_code">
|
|
254
|
+
<tr>
|
|
255
|
+
<td>
|
|
256
|
+
<pre class="lines">
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
17
|
|
260
|
+
18
|
|
261
|
+
19
|
|
262
|
+
20
|
|
263
|
+
21
|
|
264
|
+
22
|
|
265
|
+
23</pre>
|
|
266
|
+
</td>
|
|
267
|
+
<td>
|
|
268
|
+
<pre class="code"><span class="info file"># File 'lib/inquery/method_accessible_hash.rb', line 17</span>
|
|
269
|
+
|
|
270
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_hash'>hash</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
|
271
|
+
<span class='kw'>super</span><span class='lparen'>(</span><span class='rparen'>)</span>
|
|
272
|
+
|
|
273
|
+
<span class='id identifier rubyid_hash'>hash</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='op'>|</span>
|
|
274
|
+
<span class='kw'>self</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span>
|
|
275
|
+
<span class='kw'>end</span>
|
|
276
|
+
<span class='kw'>end</span></pre>
|
|
277
|
+
</td>
|
|
278
|
+
</tr>
|
|
279
|
+
</table>
|
|
280
|
+
</div>
|
|
281
|
+
|
|
282
|
+
</div>
|
|
283
|
+
<div id="method_missing_details" class="method_details_list">
|
|
284
|
+
<h2>Dynamic Method Handling</h2>
|
|
285
|
+
<p class="notice this">
|
|
286
|
+
This class handles dynamic methods through the <tt>method_missing</tt> method
|
|
287
|
+
|
|
288
|
+
</p>
|
|
289
|
+
|
|
290
|
+
<div class="method_details first">
|
|
291
|
+
<h3 class="signature first" id="method_missing-instance_method">
|
|
292
|
+
|
|
293
|
+
#<strong>method_missing</strong>(method, *args, &_block) ⇒ <tt>Object</tt>
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
</h3><table class="source_code">
|
|
300
|
+
<tr>
|
|
301
|
+
<td>
|
|
302
|
+
<pre class="lines">
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
31
|
|
306
|
+
32
|
|
307
|
+
33
|
|
308
|
+
34
|
|
309
|
+
35
|
|
310
|
+
36
|
|
311
|
+
37
|
|
312
|
+
38</pre>
|
|
313
|
+
</td>
|
|
314
|
+
<td>
|
|
315
|
+
<pre class="code"><span class="info file"># File 'lib/inquery/method_accessible_hash.rb', line 31</span>
|
|
316
|
+
|
|
317
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_method_missing'>method_missing</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid__block'>_block</span><span class='rparen'>)</span>
|
|
318
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_method'>method</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_end_with?'>end_with?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>=</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
|
319
|
+
<span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='id identifier rubyid_method'>method</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>=$</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
|
320
|
+
<span class='kw'>self</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
|
|
321
|
+
<span class='kw'>else</span>
|
|
322
|
+
<span class='kw'>self</span><span class='lbracket'>[</span><span class='id identifier rubyid_method'>method</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='rbracket'>]</span>
|
|
323
|
+
<span class='kw'>end</span>
|
|
324
|
+
<span class='kw'>end</span></pre>
|
|
325
|
+
</td>
|
|
326
|
+
</tr>
|
|
327
|
+
</table>
|
|
328
|
+
</div>
|
|
329
|
+
|
|
330
|
+
</div>
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
<div id="instance_method_details" class="method_details_list">
|
|
334
|
+
<h2>Instance Method Details</h2>
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
<div class="method_details first">
|
|
338
|
+
<h3 class="signature first" id="merge-instance_method">
|
|
339
|
+
|
|
340
|
+
#<strong>merge</strong>(**hash) ⇒ <tt>Object</tt>
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
</h3><table class="source_code">
|
|
347
|
+
<tr>
|
|
348
|
+
<td>
|
|
349
|
+
<pre class="lines">
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
26
|
|
353
|
+
27
|
|
354
|
+
28</pre>
|
|
355
|
+
</td>
|
|
356
|
+
<td>
|
|
357
|
+
<pre class="code"><span class="info file"># File 'lib/inquery/method_accessible_hash.rb', line 26</span>
|
|
358
|
+
|
|
359
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='op'>**</span><span class='id identifier rubyid_hash'>hash</span><span class='rparen'>)</span>
|
|
360
|
+
<span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_hash'>hash</span><span class='period'>.</span><span class='id identifier rubyid_symbolize_keys'>symbolize_keys</span><span class='rparen'>)</span>
|
|
361
|
+
<span class='kw'>end</span></pre>
|
|
362
|
+
</td>
|
|
363
|
+
</tr>
|
|
364
|
+
</table>
|
|
365
|
+
</div>
|
|
366
|
+
|
|
367
|
+
<div class="method_details ">
|
|
368
|
+
<h3 class="signature " id="respond_to_missing?-instance_method">
|
|
369
|
+
|
|
370
|
+
#<strong>respond_to_missing?</strong>(_method, _include_private = false) ⇒ <tt>Boolean</tt>
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
</h3><div class="docstring">
|
|
377
|
+
<div class="discussion">
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
</div>
|
|
381
|
+
</div>
|
|
382
|
+
<div class="tags">
|
|
383
|
+
|
|
384
|
+
<p class="tag_title">Returns:</p>
|
|
385
|
+
<ul class="return">
|
|
386
|
+
|
|
387
|
+
<li>
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
</li>
|
|
395
|
+
|
|
396
|
+
</ul>
|
|
397
|
+
|
|
398
|
+
</div><table class="source_code">
|
|
399
|
+
<tr>
|
|
400
|
+
<td>
|
|
401
|
+
<pre class="lines">
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
41
|
|
405
|
+
42
|
|
406
|
+
43</pre>
|
|
407
|
+
</td>
|
|
408
|
+
<td>
|
|
409
|
+
<pre class="code"><span class="info file"># File 'lib/inquery/method_accessible_hash.rb', line 41</span>
|
|
410
|
+
|
|
411
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_respond_to_missing?'>respond_to_missing?</span><span class='lparen'>(</span><span class='id identifier rubyid__method'>_method</span><span class='comma'>,</span> <span class='id identifier rubyid__include_private'>_include_private</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
|
412
|
+
<span class='kw'>true</span>
|
|
413
|
+
<span class='kw'>end</span></pre>
|
|
414
|
+
</td>
|
|
415
|
+
</tr>
|
|
416
|
+
</table>
|
|
417
|
+
</div>
|
|
418
|
+
|
|
419
|
+
</div>
|
|
420
|
+
|
|
421
|
+
</div>
|
|
422
|
+
|
|
423
|
+
<div id="footer">
|
|
424
|
+
Generated on Mon Jan 5 14:06:48 2026 by
|
|
425
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
426
|
+
0.9.37 (ruby-3.3.5).
|
|
427
|
+
</div>
|
|
428
|
+
|
|
429
|
+
</div>
|
|
430
|
+
</body>
|
|
431
|
+
</html>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Module: Inquery::Mixins::RawSqlUtils
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.37
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
@@ -93,7 +93,20 @@
|
|
|
93
93
|
|
|
94
94
|
</div>
|
|
95
95
|
|
|
96
|
+
<h2>Overview</h2><div class="docstring">
|
|
97
|
+
<div class="discussion">
|
|
98
|
+
|
|
99
|
+
<p>Provides utilities for working with raw SQL queries in a safe way.</p>
|
|
96
100
|
|
|
101
|
+
<p>This mixin adds two helper methods for executing raw SQL queries: ‘san’ for sanitizing SQL with parameter substitution, and ‘exec_query’ for executing sanitized SQL and returning results.</p>
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
<div class="tags">
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
</div>
|
|
97
110
|
|
|
98
111
|
|
|
99
112
|
|
|
@@ -106,9 +119,9 @@
|
|
|
106
119
|
</div>
|
|
107
120
|
|
|
108
121
|
<div id="footer">
|
|
109
|
-
Generated on
|
|
110
|
-
<a href="
|
|
111
|
-
0.9.
|
|
122
|
+
Generated on Mon Jan 5 14:06:48 2026 by
|
|
123
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
124
|
+
0.9.37 (ruby-3.3.5).
|
|
112
125
|
</div>
|
|
113
126
|
|
|
114
127
|
</div>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Module: Inquery::Mixins::RelationValidation::ClassMethods
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.37
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
@@ -115,7 +115,8 @@
|
|
|
115
115
|
|
|
116
116
|
|
|
117
117
|
|
|
118
|
-
<span class="summary_desc"><div class='inline'
|
|
118
|
+
<span class="summary_desc"><div class='inline'>
|
|
119
|
+
<p>Allows to configure the parameters of the relation this query operates on.</p>
|
|
119
120
|
</div></span>
|
|
120
121
|
|
|
121
122
|
</li>
|
|
@@ -141,8 +142,8 @@
|
|
|
141
142
|
|
|
142
143
|
</h3><div class="docstring">
|
|
143
144
|
<div class="discussion">
|
|
144
|
-
|
|
145
|
-
on. See <span class='object_link'><a href="../RelationValidation.html#OPTIONS_SCHEMA-constant" title="Inquery::Mixins::RelationValidation::OPTIONS_SCHEMA (constant)">OPTIONS_SCHEMA</a></span> for documentation of the options hash.</p>
|
|
145
|
+
|
|
146
|
+
<p>Allows to configure the parameters of the relation this query operates on. See <span class='object_link'><a href="../RelationValidation.html#OPTIONS_SCHEMA-constant" title="Inquery::Mixins::RelationValidation::OPTIONS_SCHEMA (constant)">OPTIONS_SCHEMA</a></span> for documentation of the options hash.</p>
|
|
146
147
|
|
|
147
148
|
|
|
148
149
|
</div>
|
|
@@ -178,9 +179,9 @@ on. See <span class='object_link'><a href="../RelationValidation.html#OPTIONS_SC
|
|
|
178
179
|
</div>
|
|
179
180
|
|
|
180
181
|
<div id="footer">
|
|
181
|
-
Generated on
|
|
182
|
-
<a href="
|
|
183
|
-
0.9.
|
|
182
|
+
Generated on Mon Jan 5 14:06:48 2026 by
|
|
183
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
184
|
+
0.9.37 (ruby-3.3.5).
|
|
184
185
|
</div>
|
|
185
186
|
|
|
186
187
|
</div>
|