inquery 1.0.2 → 1.0.3
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/CHANGELOG.md +5 -0
- data/LICENSE +1 -1
- data/README.md +1 -1
- data/RUBY_VERSION +1 -1
- data/VERSION +1 -1
- data/doc/Inquery.html +6 -6
- data/doc/Inquery/Exceptions.html +6 -6
- data/doc/Inquery/Exceptions/Base.html +6 -6
- data/doc/Inquery/Exceptions/InvalidRelation.html +6 -6
- data/doc/Inquery/Exceptions/UnknownCallSignature.html +6 -6
- data/doc/Inquery/Mixins.html +6 -6
- data/doc/Inquery/Mixins/RawSqlUtils.html +6 -6
- data/doc/Inquery/Mixins/RelationValidation.html +6 -6
- data/doc/Inquery/Mixins/RelationValidation/ClassMethods.html +6 -6
- data/doc/Inquery/Mixins/SchemaValidation.html +6 -6
- data/doc/Inquery/Mixins/SchemaValidation/ClassMethods.html +6 -6
- data/doc/Inquery/Query.html +9 -9
- data/doc/Inquery/Query/Chainable.html +8 -8
- data/doc/_index.html +7 -7
- data/doc/class_list.html +2 -2
- data/doc/css/style.css +2 -2
- data/doc/file.README.html +21 -21
- data/doc/file_list.html +2 -2
- data/doc/frames.html +2 -2
- data/doc/index.html +21 -21
- data/doc/js/app.js +14 -3
- data/doc/method_list.html +2 -2
- data/doc/top-level-namespace.html +6 -6
- data/inquery.gemspec +3 -3
- data/lib/inquery/query.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 39e19e13ad88defbc2be460c18bff9101cabd8ec157783b737da5ec6dd051f03
|
|
4
|
+
data.tar.gz: 7b69058c75be27e17c8204f2e7bafef7161db6412c4a24c420799bae8b81344e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0ced2783b3590ae0eb76272f70a1ef387519fe773cb6d7a660136e11cb59a3a054287667e42f3dd5186ccc3d673bf3ebc1e9cc19c118abf6c44465e869ca8fd4
|
|
7
|
+
data.tar.gz: d485bfa3b54ebfb9042fc2d3678b538f9e3b1e8cc535b9f41363bb967c68516bc260a3d9a8db50e40e0f4e87a1d13d689da1d14a053c720f22bacc3b287d9934
|
data/CHANGELOG.md
CHANGED
data/LICENSE
CHANGED
data/README.md
CHANGED
data/RUBY_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
ruby-2.
|
|
1
|
+
ruby-2.6.2-p47
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.3
|
data/doc/Inquery.html
CHANGED
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Module: Inquery
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.25
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
13
|
-
<link rel="stylesheet" href="css/style.css" type="text/css"
|
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" />
|
|
14
14
|
|
|
15
|
-
<link rel="stylesheet" href="css/common.css" type="text/css"
|
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" />
|
|
16
16
|
|
|
17
|
-
<script type="text/javascript"
|
|
17
|
+
<script type="text/javascript">
|
|
18
18
|
pathId = "Inquery";
|
|
19
19
|
relpath = '';
|
|
20
20
|
</script>
|
|
@@ -109,9 +109,9 @@
|
|
|
109
109
|
</div>
|
|
110
110
|
|
|
111
111
|
<div id="footer">
|
|
112
|
-
Generated on
|
|
112
|
+
Generated on Tue May 12 13:33:18 2020 by
|
|
113
113
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
114
|
-
0.9.
|
|
114
|
+
0.9.25 (ruby-2.6.2).
|
|
115
115
|
</div>
|
|
116
116
|
|
|
117
117
|
</div>
|
data/doc/Inquery/Exceptions.html
CHANGED
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Module: Inquery::Exceptions
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.25
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
13
|
-
<link rel="stylesheet" href="../css/style.css" type="text/css"
|
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
|
14
14
|
|
|
15
|
-
<link rel="stylesheet" href="../css/common.css" type="text/css"
|
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
|
16
16
|
|
|
17
|
-
<script type="text/javascript"
|
|
17
|
+
<script type="text/javascript">
|
|
18
18
|
pathId = "Inquery::Exceptions";
|
|
19
19
|
relpath = '../';
|
|
20
20
|
</script>
|
|
@@ -105,9 +105,9 @@
|
|
|
105
105
|
</div>
|
|
106
106
|
|
|
107
107
|
<div id="footer">
|
|
108
|
-
Generated on
|
|
108
|
+
Generated on Tue May 12 13:33:18 2020 by
|
|
109
109
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
110
|
-
0.9.
|
|
110
|
+
0.9.25 (ruby-2.6.2).
|
|
111
111
|
</div>
|
|
112
112
|
|
|
113
113
|
</div>
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Exception: Inquery::Exceptions::Base
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.25
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
13
|
-
<link rel="stylesheet" href="../../css/style.css" type="text/css"
|
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" />
|
|
14
14
|
|
|
15
|
-
<link rel="stylesheet" href="../../css/common.css" type="text/css"
|
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" />
|
|
16
16
|
|
|
17
|
-
<script type="text/javascript"
|
|
17
|
+
<script type="text/javascript">
|
|
18
18
|
pathId = "Inquery::Exceptions::Base";
|
|
19
19
|
relpath = '../../';
|
|
20
20
|
</script>
|
|
@@ -118,9 +118,9 @@
|
|
|
118
118
|
</div>
|
|
119
119
|
|
|
120
120
|
<div id="footer">
|
|
121
|
-
Generated on
|
|
121
|
+
Generated on Tue May 12 13:33:18 2020 by
|
|
122
122
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
123
|
-
0.9.
|
|
123
|
+
0.9.25 (ruby-2.6.2).
|
|
124
124
|
</div>
|
|
125
125
|
|
|
126
126
|
</div>
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Exception: Inquery::Exceptions::InvalidRelation
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.25
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
13
|
-
<link rel="stylesheet" href="../../css/style.css" type="text/css"
|
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" />
|
|
14
14
|
|
|
15
|
-
<link rel="stylesheet" href="../../css/common.css" type="text/css"
|
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" />
|
|
16
16
|
|
|
17
|
-
<script type="text/javascript"
|
|
17
|
+
<script type="text/javascript">
|
|
18
18
|
pathId = "Inquery::Exceptions::InvalidRelation";
|
|
19
19
|
relpath = '../../';
|
|
20
20
|
</script>
|
|
@@ -122,9 +122,9 @@
|
|
|
122
122
|
</div>
|
|
123
123
|
|
|
124
124
|
<div id="footer">
|
|
125
|
-
Generated on
|
|
125
|
+
Generated on Tue May 12 13:33:18 2020 by
|
|
126
126
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
127
|
-
0.9.
|
|
127
|
+
0.9.25 (ruby-2.6.2).
|
|
128
128
|
</div>
|
|
129
129
|
|
|
130
130
|
</div>
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Exception: Inquery::Exceptions::UnknownCallSignature
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.25
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
13
|
-
<link rel="stylesheet" href="../../css/style.css" type="text/css"
|
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" />
|
|
14
14
|
|
|
15
|
-
<link rel="stylesheet" href="../../css/common.css" type="text/css"
|
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" />
|
|
16
16
|
|
|
17
|
-
<script type="text/javascript"
|
|
17
|
+
<script type="text/javascript">
|
|
18
18
|
pathId = "Inquery::Exceptions::UnknownCallSignature";
|
|
19
19
|
relpath = '../../';
|
|
20
20
|
</script>
|
|
@@ -122,9 +122,9 @@
|
|
|
122
122
|
</div>
|
|
123
123
|
|
|
124
124
|
<div id="footer">
|
|
125
|
-
Generated on
|
|
125
|
+
Generated on Tue May 12 13:33:18 2020 by
|
|
126
126
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
127
|
-
0.9.
|
|
127
|
+
0.9.25 (ruby-2.6.2).
|
|
128
128
|
</div>
|
|
129
129
|
|
|
130
130
|
</div>
|
data/doc/Inquery/Mixins.html
CHANGED
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Module: Inquery::Mixins
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.25
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
13
|
-
<link rel="stylesheet" href="../css/style.css" type="text/css"
|
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
|
14
14
|
|
|
15
|
-
<link rel="stylesheet" href="../css/common.css" type="text/css"
|
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
|
16
16
|
|
|
17
|
-
<script type="text/javascript"
|
|
17
|
+
<script type="text/javascript">
|
|
18
18
|
pathId = "Inquery::Mixins";
|
|
19
19
|
relpath = '../';
|
|
20
20
|
</script>
|
|
@@ -107,9 +107,9 @@
|
|
|
107
107
|
</div>
|
|
108
108
|
|
|
109
109
|
<div id="footer">
|
|
110
|
-
Generated on
|
|
110
|
+
Generated on Tue May 12 13:33:18 2020 by
|
|
111
111
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
112
|
-
0.9.
|
|
112
|
+
0.9.25 (ruby-2.6.2).
|
|
113
113
|
</div>
|
|
114
114
|
|
|
115
115
|
</div>
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Module: Inquery::Mixins::RawSqlUtils
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.25
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
13
|
-
<link rel="stylesheet" href="../../css/style.css" type="text/css"
|
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" />
|
|
14
14
|
|
|
15
|
-
<link rel="stylesheet" href="../../css/common.css" type="text/css"
|
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" />
|
|
16
16
|
|
|
17
|
-
<script type="text/javascript"
|
|
17
|
+
<script type="text/javascript">
|
|
18
18
|
pathId = "Inquery::Mixins::RawSqlUtils";
|
|
19
19
|
relpath = '../../';
|
|
20
20
|
</script>
|
|
@@ -106,9 +106,9 @@
|
|
|
106
106
|
</div>
|
|
107
107
|
|
|
108
108
|
<div id="footer">
|
|
109
|
-
Generated on
|
|
109
|
+
Generated on Tue May 12 13:33:18 2020 by
|
|
110
110
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
111
|
-
0.9.
|
|
111
|
+
0.9.25 (ruby-2.6.2).
|
|
112
112
|
</div>
|
|
113
113
|
|
|
114
114
|
</div>
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Module: Inquery::Mixins::RelationValidation
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.25
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
13
|
-
<link rel="stylesheet" href="../../css/style.css" type="text/css"
|
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" />
|
|
14
14
|
|
|
15
|
-
<link rel="stylesheet" href="../../css/common.css" type="text/css"
|
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" />
|
|
16
16
|
|
|
17
|
-
<script type="text/javascript"
|
|
17
|
+
<script type="text/javascript">
|
|
18
18
|
pathId = "Inquery::Mixins::RelationValidation";
|
|
19
19
|
relpath = '../../';
|
|
20
20
|
</script>
|
|
@@ -325,9 +325,9 @@ options specified at class level using the <code>relation</code> method.</p>
|
|
|
325
325
|
</div>
|
|
326
326
|
|
|
327
327
|
<div id="footer">
|
|
328
|
-
Generated on
|
|
328
|
+
Generated on Tue May 12 13:33:18 2020 by
|
|
329
329
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
330
|
-
0.9.
|
|
330
|
+
0.9.25 (ruby-2.6.2).
|
|
331
331
|
</div>
|
|
332
332
|
|
|
333
333
|
</div>
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Module: Inquery::Mixins::RelationValidation::ClassMethods
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.25
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
13
|
-
<link rel="stylesheet" href="../../../css/style.css" type="text/css"
|
|
13
|
+
<link rel="stylesheet" href="../../../css/style.css" type="text/css" />
|
|
14
14
|
|
|
15
|
-
<link rel="stylesheet" href="../../../css/common.css" type="text/css"
|
|
15
|
+
<link rel="stylesheet" href="../../../css/common.css" type="text/css" />
|
|
16
16
|
|
|
17
|
-
<script type="text/javascript"
|
|
17
|
+
<script type="text/javascript">
|
|
18
18
|
pathId = "Inquery::Mixins::RelationValidation::ClassMethods";
|
|
19
19
|
relpath = '../../../';
|
|
20
20
|
</script>
|
|
@@ -178,9 +178,9 @@ on. See <span class='object_link'><a href="../RelationValidation.html#OPTIONS_SC
|
|
|
178
178
|
</div>
|
|
179
179
|
|
|
180
180
|
<div id="footer">
|
|
181
|
-
Generated on
|
|
181
|
+
Generated on Tue May 12 13:33:18 2020 by
|
|
182
182
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
183
|
-
0.9.
|
|
183
|
+
0.9.25 (ruby-2.6.2).
|
|
184
184
|
</div>
|
|
185
185
|
|
|
186
186
|
</div>
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Module: Inquery::Mixins::SchemaValidation
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.25
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
13
|
-
<link rel="stylesheet" href="../../css/style.css" type="text/css"
|
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" />
|
|
14
14
|
|
|
15
|
-
<link rel="stylesheet" href="../../css/common.css" type="text/css"
|
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" />
|
|
16
16
|
|
|
17
|
-
<script type="text/javascript"
|
|
17
|
+
<script type="text/javascript">
|
|
18
18
|
pathId = "Inquery::Mixins::SchemaValidation";
|
|
19
19
|
relpath = '../../';
|
|
20
20
|
</script>
|
|
@@ -116,9 +116,9 @@
|
|
|
116
116
|
</div>
|
|
117
117
|
|
|
118
118
|
<div id="footer">
|
|
119
|
-
Generated on
|
|
119
|
+
Generated on Tue May 12 13:33:18 2020 by
|
|
120
120
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
121
|
-
0.9.
|
|
121
|
+
0.9.25 (ruby-2.6.2).
|
|
122
122
|
</div>
|
|
123
123
|
|
|
124
124
|
</div>
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Module: Inquery::Mixins::SchemaValidation::ClassMethods
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.25
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
13
|
-
<link rel="stylesheet" href="../../../css/style.css" type="text/css"
|
|
13
|
+
<link rel="stylesheet" href="../../../css/style.css" type="text/css" />
|
|
14
14
|
|
|
15
|
-
<link rel="stylesheet" href="../../../css/common.css" type="text/css"
|
|
15
|
+
<link rel="stylesheet" href="../../../css/common.css" type="text/css" />
|
|
16
16
|
|
|
17
|
-
<script type="text/javascript"
|
|
17
|
+
<script type="text/javascript">
|
|
18
18
|
pathId = "Inquery::Mixins::SchemaValidation::ClassMethods";
|
|
19
19
|
relpath = '../../../';
|
|
20
20
|
</script>
|
|
@@ -168,9 +168,9 @@
|
|
|
168
168
|
</div>
|
|
169
169
|
|
|
170
170
|
<div id="footer">
|
|
171
|
-
Generated on
|
|
171
|
+
Generated on Tue May 12 13:33:18 2020 by
|
|
172
172
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
173
|
-
0.9.
|
|
173
|
+
0.9.25 (ruby-2.6.2).
|
|
174
174
|
</div>
|
|
175
175
|
|
|
176
176
|
</div>
|
data/doc/Inquery/Query.html
CHANGED
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Class: Inquery::Query
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.25
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
13
|
-
<link rel="stylesheet" href="../css/style.css" type="text/css"
|
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
|
14
14
|
|
|
15
|
-
<link rel="stylesheet" href="../css/common.css" type="text/css"
|
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
|
16
16
|
|
|
17
|
-
<script type="text/javascript"
|
|
17
|
+
<script type="text/javascript">
|
|
18
18
|
pathId = "Inquery::Query";
|
|
19
19
|
relpath = '../';
|
|
20
20
|
</script>
|
|
@@ -421,8 +421,8 @@ was a validation schema specified).</p>
|
|
|
421
421
|
<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>
|
|
422
422
|
<span class='ivar'>@params</span> <span class='op'>=</span> <span class='id identifier rubyid_params'>params</span>
|
|
423
423
|
|
|
424
|
-
<span class='kw'>if</span> <span class='
|
|
425
|
-
<span class='
|
|
424
|
+
<span class='kw'>if</span> <span class='id identifier rubyid__schema'>_schema</span>
|
|
425
|
+
<span class='ivar'>@params</span> <span class='op'>=</span> <span class='id identifier rubyid__schema'>_schema</span><span class='period'>.</span><span class='id identifier rubyid_validate!'>validate!</span><span class='lparen'>(</span><span class='ivar'>@params</span><span class='rparen'>)</span>
|
|
426
426
|
<span class='kw'>end</span>
|
|
427
427
|
<span class='kw'>end</span></pre>
|
|
428
428
|
</td>
|
|
@@ -448,7 +448,7 @@ was a validation schema specified).</p>
|
|
|
448
448
|
|
|
449
449
|
</h3><div class="docstring">
|
|
450
450
|
<div class="discussion">
|
|
451
|
-
<p>Returns the value of attribute params
|
|
451
|
+
<p>Returns the value of attribute params.</p>
|
|
452
452
|
|
|
453
453
|
|
|
454
454
|
</div>
|
|
@@ -779,9 +779,9 @@ easyer access.</p>
|
|
|
779
779
|
</div>
|
|
780
780
|
|
|
781
781
|
<div id="footer">
|
|
782
|
-
Generated on
|
|
782
|
+
Generated on Tue May 12 13:33:18 2020 by
|
|
783
783
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
784
|
-
0.9.
|
|
784
|
+
0.9.25 (ruby-2.6.2).
|
|
785
785
|
</div>
|
|
786
786
|
|
|
787
787
|
</div>
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Class: Inquery::Query::Chainable
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.25
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
13
|
-
<link rel="stylesheet" href="../../css/style.css" type="text/css"
|
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" />
|
|
14
14
|
|
|
15
|
-
<link rel="stylesheet" href="../../css/common.css" type="text/css"
|
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" />
|
|
16
16
|
|
|
17
|
-
<script type="text/javascript"
|
|
17
|
+
<script type="text/javascript">
|
|
18
18
|
pathId = "Inquery::Query::Chainable";
|
|
19
19
|
relpath = '../../';
|
|
20
20
|
</script>
|
|
@@ -321,7 +321,7 @@
|
|
|
321
321
|
|
|
322
322
|
</h3><div class="docstring">
|
|
323
323
|
<div class="discussion">
|
|
324
|
-
<p>Returns a new instance of Chainable
|
|
324
|
+
<p>Returns a new instance of Chainable.</p>
|
|
325
325
|
|
|
326
326
|
|
|
327
327
|
</div>
|
|
@@ -372,7 +372,7 @@
|
|
|
372
372
|
|
|
373
373
|
</h3><div class="docstring">
|
|
374
374
|
<div class="discussion">
|
|
375
|
-
<p>Returns the value of attribute relation
|
|
375
|
+
<p>Returns the value of attribute relation.</p>
|
|
376
376
|
|
|
377
377
|
|
|
378
378
|
</div>
|
|
@@ -529,9 +529,9 @@
|
|
|
529
529
|
</div>
|
|
530
530
|
|
|
531
531
|
<div id="footer">
|
|
532
|
-
Generated on
|
|
532
|
+
Generated on Tue May 12 13:33:19 2020 by
|
|
533
533
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
534
|
-
0.9.
|
|
534
|
+
0.9.25 (ruby-2.6.2).
|
|
535
535
|
</div>
|
|
536
536
|
|
|
537
537
|
</div>
|
data/doc/_index.html
CHANGED
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
6
|
<title>
|
|
7
|
-
Documentation by YARD 0.9.
|
|
7
|
+
Documentation by YARD 0.9.25
|
|
8
8
|
|
|
9
9
|
</title>
|
|
10
10
|
|
|
11
|
-
<link rel="stylesheet" href="css/style.css" type="text/css"
|
|
11
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" />
|
|
12
12
|
|
|
13
|
-
<link rel="stylesheet" href="css/common.css" type="text/css"
|
|
13
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" />
|
|
14
14
|
|
|
15
|
-
<script type="text/javascript"
|
|
15
|
+
<script type="text/javascript">
|
|
16
16
|
pathId = null;
|
|
17
17
|
relpath = '';
|
|
18
18
|
</script>
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
<div class="clear"></div>
|
|
53
53
|
</div>
|
|
54
54
|
|
|
55
|
-
<div id="content"><h1 class="noborder title">Documentation by YARD 0.9.
|
|
55
|
+
<div id="content"><h1 class="noborder title">Documentation by YARD 0.9.25</h1>
|
|
56
56
|
<div id="listing">
|
|
57
57
|
<h1 class="alphaindex">Alphabetic Index</h1>
|
|
58
58
|
|
|
@@ -248,9 +248,9 @@
|
|
|
248
248
|
</div>
|
|
249
249
|
|
|
250
250
|
<div id="footer">
|
|
251
|
-
Generated on
|
|
251
|
+
Generated on Tue May 12 13:33:18 2020 by
|
|
252
252
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
253
|
-
0.9.
|
|
253
|
+
0.9.25 (ruby-2.6.2).
|
|
254
254
|
</div>
|
|
255
255
|
|
|
256
256
|
</div>
|
data/doc/class_list.html
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
5
5
|
<meta charset="utf-8" />
|
|
6
6
|
|
|
7
|
-
<link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen"
|
|
7
|
+
<link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" />
|
|
8
8
|
|
|
9
|
-
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen"
|
|
9
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" />
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
data/doc/css/style.css
CHANGED
|
@@ -422,8 +422,8 @@ li.r2 { background: #fafafa; }
|
|
|
422
422
|
#toc ol { padding-left: 1.8em; }
|
|
423
423
|
#toc li { font-size: 1.1em; line-height: 1.7em; }
|
|
424
424
|
#toc > ol > li { font-size: 1.1em; font-weight: bold; }
|
|
425
|
-
#toc ol > ol { font-size: 0.9em; }
|
|
426
|
-
#toc ol ol > ol { padding-left: 2.3em; }
|
|
425
|
+
#toc ol > li > ol { font-size: 0.9em; }
|
|
426
|
+
#toc ol ol > li > ol { padding-left: 2.3em; }
|
|
427
427
|
#toc ol + li { margin-top: 0.3em; }
|
|
428
428
|
#toc.hidden { padding: 10px; background: #fefefe; box-shadow: none; }
|
|
429
429
|
#toc.hidden:hover { background: #fafafa; }
|
data/doc/file.README.html
CHANGED
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
File: README
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.25
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
13
|
-
<link rel="stylesheet" href="css/style.css" type="text/css"
|
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" />
|
|
14
14
|
|
|
15
|
-
<link rel="stylesheet" href="css/common.css" type="text/css"
|
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" />
|
|
16
16
|
|
|
17
|
-
<script type="text/javascript"
|
|
17
|
+
<script type="text/javascript">
|
|
18
18
|
pathId = "README";
|
|
19
19
|
relpath = '';
|
|
20
20
|
</script>
|
|
@@ -60,11 +60,11 @@
|
|
|
60
60
|
<div id="content"><div id='filecontents'><p><a href="https://travis-ci.org/sitrox/inquery"><img src="https://travis-ci.org/sitrox/inquery.svg?branch=master" alt="Build Status"></a>
|
|
61
61
|
<a href="https://badge.fury.io/rb/inquery"><img src="https://badge.fury.io/rb/inquery.svg" alt="Gem Version"></a></p>
|
|
62
62
|
|
|
63
|
-
<h1>Inquery</h1>
|
|
63
|
+
<h1 id="inquery">Inquery</h1>
|
|
64
64
|
|
|
65
65
|
<p>A skeleton that allows extracting queries into atomic, reusable classes.</p>
|
|
66
66
|
|
|
67
|
-
<h2>Installation</h2>
|
|
67
|
+
<h2 id="installation">Installation</h2>
|
|
68
68
|
|
|
69
69
|
<p>To install the <strong>Inquery</strong> gem:</p>
|
|
70
70
|
|
|
@@ -77,7 +77,7 @@ to your <code>Gemfile</code>:</p>
|
|
|
77
77
|
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>inquery</span><span class='tstring_end'>'</span></span>
|
|
78
78
|
</code></pre>
|
|
79
79
|
|
|
80
|
-
<h2>Basic usage</h2>
|
|
80
|
+
<h2 id="basic-usage">Basic usage</h2>
|
|
81
81
|
|
|
82
82
|
<pre class="code ruby"><code class="ruby"><span class='kw'>class</span> <span class='const'>FetchUsersWithACar</span> <span class='op'><</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>
|
|
83
83
|
<span class='id identifier rubyid_schema'>schema</span> <span class='kw'>do</span>
|
|
@@ -97,7 +97,7 @@ to your <code>Gemfile</code>:</p>
|
|
|
97
97
|
and <span class='object_link'><a href="Inquery/Query/Chainable.html" title="Inquery::Query::Chainable (class)">Inquery::Query::Chainable</a></span>. See the following sections for detailed
|
|
98
98
|
explanations.</p>
|
|
99
99
|
|
|
100
|
-
<h2>Basic queries</h2>
|
|
100
|
+
<h2 id="basic-queries">Basic queries</h2>
|
|
101
101
|
|
|
102
102
|
<p>Basic queries inherit from <span class='object_link'><a href="Inquery/Query.html" title="Inquery::Query (class)">Inquery::Query</a></span>. They receive an optional set of
|
|
103
103
|
parameters and commonly return a relation / AR result. An optional <code>process</code>
|
|
@@ -141,7 +141,7 @@ the <code>call</code> and optionally the <code>process</code> method:</p>
|
|
|
141
141
|
<p>Note that it's perfectly fine for some queries to return <code>nil</code>, i.e. if they're
|
|
142
142
|
writing queries that don't fetch any results.</p>
|
|
143
143
|
|
|
144
|
-
<h3>Using raw SQL</h3>
|
|
144
|
+
<h3 id="using-raw-sql">Using raw SQL</h3>
|
|
145
145
|
|
|
146
146
|
<p>In some cases it may make sense to push down all computation to the database and
|
|
147
147
|
only construct an SQL query for this purpose. To facilitate this,
|
|
@@ -171,7 +171,7 @@ only construct an SQL query for this purpose. To facilitate this,
|
|
|
171
171
|
<span class='kw'>end</span>
|
|
172
172
|
</code></pre>
|
|
173
173
|
|
|
174
|
-
<h2>Chainable queries</h2>
|
|
174
|
+
<h2 id="chainable-queries">Chainable queries</h2>
|
|
175
175
|
|
|
176
176
|
<p>Chainable queries are queries that input and output an Active Record relation.
|
|
177
177
|
You can access the given relation using the method <code>relation</code>:</p>
|
|
@@ -187,7 +187,7 @@ You can access the given relation using the method <code>relation</code>:</p>
|
|
|
187
187
|
could pass a relation of <code>Group</code>s and receive back a relation of corresponding
|
|
188
188
|
<code>User</code>s).</p>
|
|
189
189
|
|
|
190
|
-
<h3>Relation validation</h3>
|
|
190
|
+
<h3 id="relation-validation">Relation validation</h3>
|
|
191
191
|
|
|
192
192
|
<p>Chainable queries allow you to further specify and validate the relation it
|
|
193
193
|
receives. This is done using the static <code>relation</code> method:</p>
|
|
@@ -229,7 +229,7 @@ automatically select the given field. This option defaults to <code>:id</code>.
|
|
|
229
229
|
<code>nil</code> to disable this behavior.</p></li>
|
|
230
230
|
</ul>
|
|
231
231
|
|
|
232
|
-
<h3>Using query classes as regular scopes</h3>
|
|
232
|
+
<h3 id="using-query-classes-as-regular-scopes">Using query classes as regular scopes</h3>
|
|
233
233
|
|
|
234
234
|
<p>Chainable queries can also be used as regular AR model scopes:</p>
|
|
235
235
|
|
|
@@ -255,7 +255,7 @@ but have the possibly complex query code hidden in a separate, reusable class.</
|
|
|
255
255
|
|
|
256
256
|
<p>Note that when using classes as scopes, the <code>process</code> method will be ignored.</p>
|
|
257
257
|
|
|
258
|
-
<h3>Using the given relation as subquery</h3>
|
|
258
|
+
<h3 id="using-the-given-relation-as-subquery">Using the given relation as subquery</h3>
|
|
259
259
|
|
|
260
260
|
<p>In simple cases and all the examples above, we just extend the given relation
|
|
261
261
|
and return it again. It is also possible however to just use the given relation
|
|
@@ -291,7 +291,7 @@ as a subquery and return a completely new relation:</p>
|
|
|
291
291
|
</span><span class='const'>FetchUsersInGroup</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='const'>Group</span><span class='period'>.</span><span class='id identifier rubyid_where'>where</span><span class='lparen'>(</span><span class='label'>color:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>red</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
292
292
|
</code></pre>
|
|
293
293
|
|
|
294
|
-
<h2>Parameters</h2>
|
|
294
|
+
<h2 id="parameters">Parameters</h2>
|
|
295
295
|
|
|
296
296
|
<p>Both query classes can be parameterized using a hash called <code>params</code>. It is
|
|
297
297
|
recommended to specify and validate input parameters in every query. For this
|
|
@@ -328,14 +328,14 @@ access.</p>
|
|
|
328
328
|
<span class='kw'>end</span>
|
|
329
329
|
</code></pre>
|
|
330
330
|
|
|
331
|
-
<h2>Rails integration</h2>
|
|
331
|
+
<h2 id="rails-integration">Rails integration</h2>
|
|
332
332
|
|
|
333
333
|
<p>While it is optional, Inquery has been written from the ground up to be
|
|
334
334
|
perfectly integrated into any Rails application. It has proven to be a winning
|
|
335
335
|
concept to extract all complex queries into separate classes that are
|
|
336
336
|
independently executable and testable.</p>
|
|
337
337
|
|
|
338
|
-
<h3>Directory structure</h3>
|
|
338
|
+
<h3 id="directory-structure">Directory structure</h3>
|
|
339
339
|
|
|
340
340
|
<p>While not enforced, it is encouraged to use the following structure for storing
|
|
341
341
|
your query classes:</p>
|
|
@@ -363,20 +363,20 @@ clear where to find the corresponding unit tests for each one of your
|
|
|
363
363
|
query classes.</li>
|
|
364
364
|
</ul>
|
|
365
365
|
|
|
366
|
-
<h2>Contributors</h2>
|
|
366
|
+
<h2 id="contributors">Contributors</h2>
|
|
367
367
|
|
|
368
368
|
<p>Thanks to Jeroen Weeink for his insights regarding using query classes as scopes
|
|
369
369
|
in his <a href="http://craftingruby.com/posts/2015/06/29/query-objects-through-scopes.html">blog post</a>.</p>
|
|
370
370
|
|
|
371
|
-
<h2>Copyright</h2>
|
|
371
|
+
<h2 id="copyright">Copyright</h2>
|
|
372
372
|
|
|
373
|
-
<p>Copyright (c)
|
|
373
|
+
<p>Copyright (c) 2020 Sitrox. See <code>LICENSE</code> for further details.</p>
|
|
374
374
|
</div></div>
|
|
375
375
|
|
|
376
376
|
<div id="footer">
|
|
377
|
-
Generated on
|
|
377
|
+
Generated on Tue May 12 13:33:18 2020 by
|
|
378
378
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
379
|
-
0.9.
|
|
379
|
+
0.9.25 (ruby-2.6.2).
|
|
380
380
|
</div>
|
|
381
381
|
|
|
382
382
|
</div>
|
data/doc/file_list.html
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
5
5
|
<meta charset="utf-8" />
|
|
6
6
|
|
|
7
|
-
<link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen"
|
|
7
|
+
<link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" />
|
|
8
8
|
|
|
9
|
-
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen"
|
|
9
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" />
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
data/doc/frames.html
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
<html>
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
5
|
-
<title>Documentation by YARD 0.9.
|
|
5
|
+
<title>Documentation by YARD 0.9.25</title>
|
|
6
6
|
</head>
|
|
7
|
-
<script type="text/javascript"
|
|
7
|
+
<script type="text/javascript">
|
|
8
8
|
var match = unescape(window.location.hash).match(/^#!(.+)/);
|
|
9
9
|
var name = match ? match[1] : 'index.html';
|
|
10
10
|
name = name.replace(/^(\w+):\/\//, '').replace(/^\/\//, '');
|
data/doc/index.html
CHANGED
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
File: README
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.25
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
13
|
-
<link rel="stylesheet" href="css/style.css" type="text/css"
|
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" />
|
|
14
14
|
|
|
15
|
-
<link rel="stylesheet" href="css/common.css" type="text/css"
|
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" />
|
|
16
16
|
|
|
17
|
-
<script type="text/javascript"
|
|
17
|
+
<script type="text/javascript">
|
|
18
18
|
pathId = "README";
|
|
19
19
|
relpath = '';
|
|
20
20
|
</script>
|
|
@@ -60,11 +60,11 @@
|
|
|
60
60
|
<div id="content"><div id='filecontents'><p><a href="https://travis-ci.org/sitrox/inquery"><img src="https://travis-ci.org/sitrox/inquery.svg?branch=master" alt="Build Status"></a>
|
|
61
61
|
<a href="https://badge.fury.io/rb/inquery"><img src="https://badge.fury.io/rb/inquery.svg" alt="Gem Version"></a></p>
|
|
62
62
|
|
|
63
|
-
<h1>Inquery</h1>
|
|
63
|
+
<h1 id="inquery">Inquery</h1>
|
|
64
64
|
|
|
65
65
|
<p>A skeleton that allows extracting queries into atomic, reusable classes.</p>
|
|
66
66
|
|
|
67
|
-
<h2>Installation</h2>
|
|
67
|
+
<h2 id="installation">Installation</h2>
|
|
68
68
|
|
|
69
69
|
<p>To install the <strong>Inquery</strong> gem:</p>
|
|
70
70
|
|
|
@@ -77,7 +77,7 @@ to your <code>Gemfile</code>:</p>
|
|
|
77
77
|
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>inquery</span><span class='tstring_end'>'</span></span>
|
|
78
78
|
</code></pre>
|
|
79
79
|
|
|
80
|
-
<h2>Basic usage</h2>
|
|
80
|
+
<h2 id="basic-usage">Basic usage</h2>
|
|
81
81
|
|
|
82
82
|
<pre class="code ruby"><code class="ruby"><span class='kw'>class</span> <span class='const'>FetchUsersWithACar</span> <span class='op'><</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>
|
|
83
83
|
<span class='id identifier rubyid_schema'>schema</span> <span class='kw'>do</span>
|
|
@@ -97,7 +97,7 @@ to your <code>Gemfile</code>:</p>
|
|
|
97
97
|
and <span class='object_link'><a href="Inquery/Query/Chainable.html" title="Inquery::Query::Chainable (class)">Inquery::Query::Chainable</a></span>. See the following sections for detailed
|
|
98
98
|
explanations.</p>
|
|
99
99
|
|
|
100
|
-
<h2>Basic queries</h2>
|
|
100
|
+
<h2 id="basic-queries">Basic queries</h2>
|
|
101
101
|
|
|
102
102
|
<p>Basic queries inherit from <span class='object_link'><a href="Inquery/Query.html" title="Inquery::Query (class)">Inquery::Query</a></span>. They receive an optional set of
|
|
103
103
|
parameters and commonly return a relation / AR result. An optional <code>process</code>
|
|
@@ -141,7 +141,7 @@ the <code>call</code> and optionally the <code>process</code> method:</p>
|
|
|
141
141
|
<p>Note that it's perfectly fine for some queries to return <code>nil</code>, i.e. if they're
|
|
142
142
|
writing queries that don't fetch any results.</p>
|
|
143
143
|
|
|
144
|
-
<h3>Using raw SQL</h3>
|
|
144
|
+
<h3 id="using-raw-sql">Using raw SQL</h3>
|
|
145
145
|
|
|
146
146
|
<p>In some cases it may make sense to push down all computation to the database and
|
|
147
147
|
only construct an SQL query for this purpose. To facilitate this,
|
|
@@ -171,7 +171,7 @@ only construct an SQL query for this purpose. To facilitate this,
|
|
|
171
171
|
<span class='kw'>end</span>
|
|
172
172
|
</code></pre>
|
|
173
173
|
|
|
174
|
-
<h2>Chainable queries</h2>
|
|
174
|
+
<h2 id="chainable-queries">Chainable queries</h2>
|
|
175
175
|
|
|
176
176
|
<p>Chainable queries are queries that input and output an Active Record relation.
|
|
177
177
|
You can access the given relation using the method <code>relation</code>:</p>
|
|
@@ -187,7 +187,7 @@ You can access the given relation using the method <code>relation</code>:</p>
|
|
|
187
187
|
could pass a relation of <code>Group</code>s and receive back a relation of corresponding
|
|
188
188
|
<code>User</code>s).</p>
|
|
189
189
|
|
|
190
|
-
<h3>Relation validation</h3>
|
|
190
|
+
<h3 id="relation-validation">Relation validation</h3>
|
|
191
191
|
|
|
192
192
|
<p>Chainable queries allow you to further specify and validate the relation it
|
|
193
193
|
receives. This is done using the static <code>relation</code> method:</p>
|
|
@@ -229,7 +229,7 @@ automatically select the given field. This option defaults to <code>:id</code>.
|
|
|
229
229
|
<code>nil</code> to disable this behavior.</p></li>
|
|
230
230
|
</ul>
|
|
231
231
|
|
|
232
|
-
<h3>Using query classes as regular scopes</h3>
|
|
232
|
+
<h3 id="using-query-classes-as-regular-scopes">Using query classes as regular scopes</h3>
|
|
233
233
|
|
|
234
234
|
<p>Chainable queries can also be used as regular AR model scopes:</p>
|
|
235
235
|
|
|
@@ -255,7 +255,7 @@ but have the possibly complex query code hidden in a separate, reusable class.</
|
|
|
255
255
|
|
|
256
256
|
<p>Note that when using classes as scopes, the <code>process</code> method will be ignored.</p>
|
|
257
257
|
|
|
258
|
-
<h3>Using the given relation as subquery</h3>
|
|
258
|
+
<h3 id="using-the-given-relation-as-subquery">Using the given relation as subquery</h3>
|
|
259
259
|
|
|
260
260
|
<p>In simple cases and all the examples above, we just extend the given relation
|
|
261
261
|
and return it again. It is also possible however to just use the given relation
|
|
@@ -291,7 +291,7 @@ as a subquery and return a completely new relation:</p>
|
|
|
291
291
|
</span><span class='const'>FetchUsersInGroup</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='const'>Group</span><span class='period'>.</span><span class='id identifier rubyid_where'>where</span><span class='lparen'>(</span><span class='label'>color:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>red</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
292
292
|
</code></pre>
|
|
293
293
|
|
|
294
|
-
<h2>Parameters</h2>
|
|
294
|
+
<h2 id="parameters">Parameters</h2>
|
|
295
295
|
|
|
296
296
|
<p>Both query classes can be parameterized using a hash called <code>params</code>. It is
|
|
297
297
|
recommended to specify and validate input parameters in every query. For this
|
|
@@ -328,14 +328,14 @@ access.</p>
|
|
|
328
328
|
<span class='kw'>end</span>
|
|
329
329
|
</code></pre>
|
|
330
330
|
|
|
331
|
-
<h2>Rails integration</h2>
|
|
331
|
+
<h2 id="rails-integration">Rails integration</h2>
|
|
332
332
|
|
|
333
333
|
<p>While it is optional, Inquery has been written from the ground up to be
|
|
334
334
|
perfectly integrated into any Rails application. It has proven to be a winning
|
|
335
335
|
concept to extract all complex queries into separate classes that are
|
|
336
336
|
independently executable and testable.</p>
|
|
337
337
|
|
|
338
|
-
<h3>Directory structure</h3>
|
|
338
|
+
<h3 id="directory-structure">Directory structure</h3>
|
|
339
339
|
|
|
340
340
|
<p>While not enforced, it is encouraged to use the following structure for storing
|
|
341
341
|
your query classes:</p>
|
|
@@ -363,20 +363,20 @@ clear where to find the corresponding unit tests for each one of your
|
|
|
363
363
|
query classes.</li>
|
|
364
364
|
</ul>
|
|
365
365
|
|
|
366
|
-
<h2>Contributors</h2>
|
|
366
|
+
<h2 id="contributors">Contributors</h2>
|
|
367
367
|
|
|
368
368
|
<p>Thanks to Jeroen Weeink for his insights regarding using query classes as scopes
|
|
369
369
|
in his <a href="http://craftingruby.com/posts/2015/06/29/query-objects-through-scopes.html">blog post</a>.</p>
|
|
370
370
|
|
|
371
|
-
<h2>Copyright</h2>
|
|
371
|
+
<h2 id="copyright">Copyright</h2>
|
|
372
372
|
|
|
373
|
-
<p>Copyright (c)
|
|
373
|
+
<p>Copyright (c) 2020 Sitrox. See <code>LICENSE</code> for further details.</p>
|
|
374
374
|
</div></div>
|
|
375
375
|
|
|
376
376
|
<div id="footer">
|
|
377
|
-
Generated on
|
|
377
|
+
Generated on Tue May 12 13:33:18 2020 by
|
|
378
378
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
379
|
-
0.9.
|
|
379
|
+
0.9.25 (ruby-2.6.2).
|
|
380
380
|
</div>
|
|
381
381
|
|
|
382
382
|
</div>
|
data/doc/js/app.js
CHANGED
|
@@ -171,6 +171,7 @@ function generateTOC() {
|
|
|
171
171
|
var counter = 0;
|
|
172
172
|
var tags = ['h2', 'h3', 'h4', 'h5', 'h6'];
|
|
173
173
|
var i;
|
|
174
|
+
var curli;
|
|
174
175
|
if ($('#filecontents h1').length > 1) tags.unshift('h1');
|
|
175
176
|
for (i = 0; i < tags.length; i++) { tags[i] = '#filecontents ' + tags[i]; }
|
|
176
177
|
var lastTag = parseInt(tags[0][1], 10);
|
|
@@ -190,15 +191,25 @@ function generateTOC() {
|
|
|
190
191
|
}
|
|
191
192
|
if (thisTag > lastTag) {
|
|
192
193
|
for (i = 0; i < thisTag - lastTag; i++) {
|
|
193
|
-
|
|
194
|
+
if ( typeof(curli) == "undefined" ) {
|
|
195
|
+
curli = $('<li/>');
|
|
196
|
+
toc.append(curli);
|
|
197
|
+
}
|
|
198
|
+
toc = $('<ol/>');
|
|
199
|
+
curli.append(toc);
|
|
200
|
+
curli = undefined;
|
|
194
201
|
}
|
|
195
202
|
}
|
|
196
203
|
if (thisTag < lastTag) {
|
|
197
|
-
for (i = 0; i < lastTag - thisTag; i++)
|
|
204
|
+
for (i = 0; i < lastTag - thisTag; i++) {
|
|
205
|
+
toc = toc.parent();
|
|
206
|
+
toc = toc.parent();
|
|
207
|
+
}
|
|
198
208
|
}
|
|
199
209
|
var title = $(this).attr('toc-title');
|
|
200
210
|
if (typeof(title) == "undefined") title = $(this).text();
|
|
201
|
-
|
|
211
|
+
curli =$('<li><a href="#' + this.id + '">' + title + '</a></li>');
|
|
212
|
+
toc.append(curli);
|
|
202
213
|
lastTag = thisTag;
|
|
203
214
|
});
|
|
204
215
|
if (!show) return;
|
data/doc/method_list.html
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
5
5
|
<meta charset="utf-8" />
|
|
6
6
|
|
|
7
|
-
<link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen"
|
|
7
|
+
<link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" />
|
|
8
8
|
|
|
9
|
-
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen"
|
|
9
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" />
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Top Level Namespace
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.25
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
13
|
-
<link rel="stylesheet" href="css/style.css" type="text/css"
|
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" />
|
|
14
14
|
|
|
15
|
-
<link rel="stylesheet" href="css/common.css" type="text/css"
|
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" />
|
|
16
16
|
|
|
17
|
-
<script type="text/javascript"
|
|
17
|
+
<script type="text/javascript">
|
|
18
18
|
pathId = "";
|
|
19
19
|
relpath = '';
|
|
20
20
|
</script>
|
|
@@ -100,9 +100,9 @@
|
|
|
100
100
|
</div>
|
|
101
101
|
|
|
102
102
|
<div id="footer">
|
|
103
|
-
Generated on
|
|
103
|
+
Generated on Tue May 12 13:33:18 2020 by
|
|
104
104
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
105
|
-
0.9.
|
|
105
|
+
0.9.25 (ruby-2.6.2).
|
|
106
106
|
</div>
|
|
107
107
|
|
|
108
108
|
</div>
|
data/inquery.gemspec
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
|
2
|
-
# stub: inquery 1.0.
|
|
2
|
+
# stub: inquery 1.0.3 ruby lib
|
|
3
3
|
|
|
4
4
|
Gem::Specification.new do |s|
|
|
5
5
|
s.name = "inquery".freeze
|
|
6
|
-
s.version = "1.0.
|
|
6
|
+
s.version = "1.0.3"
|
|
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 = "
|
|
11
|
+
s.date = "2020-05-12"
|
|
12
12
|
s.files = [".gitignore".freeze, ".releaser_config".freeze, ".rubocop.yml".freeze, ".travis.yml".freeze, ".yardopts".freeze, "CHANGELOG.md".freeze, "Gemfile".freeze, "LICENSE".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/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, "inquery.gemspec".freeze, "lib/inquery.rb".freeze, "lib/inquery/exceptions.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/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.rubygems_version = "3.0.3".freeze
|
|
14
14
|
s.summary = "A skeleton that allows extracting queries into atomic, reusable classes.".freeze
|
data/lib/inquery/query.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: inquery
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sitrox
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2020-05-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -247,7 +247,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
247
247
|
- !ruby/object:Gem::Version
|
|
248
248
|
version: '0'
|
|
249
249
|
requirements: []
|
|
250
|
-
rubygems_version: 3.
|
|
250
|
+
rubygems_version: 3.1.2
|
|
251
251
|
signing_key:
|
|
252
252
|
specification_version: 4
|
|
253
253
|
summary: A skeleton that allows extracting queries into atomic, reusable classes.
|