inquery 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +17 -0
- data/LICENSE +2 -2
- data/README.md +32 -2
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/doc/Inquery.html +4 -4
- data/doc/Inquery/Exceptions.html +3 -3
- data/doc/Inquery/Exceptions/Base.html +3 -3
- data/doc/Inquery/Exceptions/InvalidRelation.html +3 -3
- data/doc/Inquery/Exceptions/UnknownCallSignature.html +3 -3
- data/doc/Inquery/Mixins.html +6 -6
- data/doc/Inquery/Mixins/RawSqlUtils.html +116 -0
- data/doc/Inquery/Mixins/RelationValidation.html +23 -17
- data/doc/Inquery/Mixins/RelationValidation/ClassMethods.html +3 -3
- data/doc/Inquery/Mixins/SchemaValidation.html +3 -3
- data/doc/Inquery/Mixins/SchemaValidation/ClassMethods.html +3 -3
- data/doc/Inquery/Query.html +99 -28
- data/doc/Inquery/Query/Chainable.html +73 -3
- data/doc/_index.html +15 -8
- data/doc/class_list.html +1 -1
- data/doc/css/style.css +10 -6
- data/doc/file.README.html +35 -6
- data/doc/frames.html +1 -1
- data/doc/index.html +35 -6
- data/doc/js/app.js +55 -0
- data/doc/method_list.html +24 -8
- data/doc/top-level-namespace.html +3 -3
- data/inquery.gemspec +8 -8
- data/lib/inquery.rb +1 -0
- data/lib/inquery/mixins/raw_sql_utils.rb +23 -0
- data/lib/inquery/query.rb +7 -0
- data/lib/inquery/query/chainable.rb +5 -0
- metadata +10 -8
data/lib/inquery/query.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
module Inquery
|
2
2
|
class Query
|
3
3
|
include Mixins::SchemaValidation
|
4
|
+
include Mixins::RawSqlUtils
|
4
5
|
|
5
6
|
attr_reader :params
|
6
7
|
|
@@ -46,5 +47,11 @@ module Inquery
|
|
46
47
|
def osparams
|
47
48
|
@osparams ||= OpenStruct.new(params)
|
48
49
|
end
|
50
|
+
|
51
|
+
# Provides a connection to the database. May be overridden if a different
|
52
|
+
# connection is desired. Defaults to `ActiveRecord::Base.connection`.
|
53
|
+
def connection
|
54
|
+
ActiveRecord::Base.connection
|
55
|
+
end
|
49
56
|
end
|
50
57
|
end
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
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.2
|
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: 2019-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -175,6 +175,7 @@ files:
|
|
175
175
|
- ".rubocop.yml"
|
176
176
|
- ".travis.yml"
|
177
177
|
- ".yardopts"
|
178
|
+
- CHANGELOG.md
|
178
179
|
- Gemfile
|
179
180
|
- LICENSE
|
180
181
|
- README.md
|
@@ -187,6 +188,7 @@ files:
|
|
187
188
|
- doc/Inquery/Exceptions/InvalidRelation.html
|
188
189
|
- doc/Inquery/Exceptions/UnknownCallSignature.html
|
189
190
|
- doc/Inquery/Mixins.html
|
191
|
+
- doc/Inquery/Mixins/RawSqlUtils.html
|
190
192
|
- doc/Inquery/Mixins/RelationValidation.html
|
191
193
|
- doc/Inquery/Mixins/RelationValidation/ClassMethods.html
|
192
194
|
- doc/Inquery/Mixins/SchemaValidation.html
|
@@ -210,6 +212,7 @@ files:
|
|
210
212
|
- inquery.gemspec
|
211
213
|
- lib/inquery.rb
|
212
214
|
- lib/inquery/exceptions.rb
|
215
|
+
- lib/inquery/mixins/raw_sql_utils.rb
|
213
216
|
- lib/inquery/mixins/relation_validation.rb
|
214
217
|
- lib/inquery/mixins/schema_validation.rb
|
215
218
|
- lib/inquery/query.rb
|
@@ -244,8 +247,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
244
247
|
- !ruby/object:Gem::Version
|
245
248
|
version: '0'
|
246
249
|
requirements: []
|
247
|
-
|
248
|
-
rubygems_version: 2.6.8
|
250
|
+
rubygems_version: 3.0.3
|
249
251
|
signing_key:
|
250
252
|
specification_version: 4
|
251
253
|
summary: A skeleton that allows extracting queries into atomic, reusable classes.
|