activecube-graphql 0.1.21 → 0.1.26
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/Gemfile.lock +2 -2
- data/lib/activecube/graphql/cube_field.rb +9 -11
- data/lib/activecube/graphql/parse_tree.rb +10 -3
- data/lib/activecube/graphql/version.rb +1 -1
- metadata +6 -10
- data/.idea/activecube-graphql.iml +0 -61
- data/.idea/misc.xml +0 -7
- data/.idea/modules.xml +0 -8
- data/.idea/workspace.xml +0 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d28651611a3435fe0b0f85a8305d5b9b71fca9fbf48e7baffe055ee13ebc0762
|
4
|
+
data.tar.gz: 46af8b29f6594cb934c638dc32715d8e9b707652286032144725ce4d127ba6ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9aa58663c3966927e879de34ec4690b790cc143a72087db20c6a73b7803f5b63b4da8c6e82654c3076e317abbe9592c9c31f30409c226a5c118f8f525bc02cd
|
7
|
+
data.tar.gz: a7128035f399bbbf6090201796c39781895e9572e6bee6de680b17760375a92f3eea26a4015192b6407c95842feb11deaaaf49f1802f7edb05239d1c0222ed86
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
activecube-graphql (0.1.
|
4
|
+
activecube-graphql (0.1.22)
|
5
5
|
activecube (~> 0.1.28)
|
6
6
|
graphql (~> 1.10)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activecube (0.1.
|
11
|
+
activecube (0.1.35)
|
12
12
|
activerecord (>= 5.2)
|
13
13
|
activemodel (6.1.4)
|
14
14
|
activesupport (= 6.1.4)
|
@@ -29,14 +29,13 @@ module Activecube
|
|
29
29
|
irep_node = ruby_kwargs[:irep_node]
|
30
30
|
tree = ParseTree.new cube, irep_node
|
31
31
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
end : execute_query(tree, ctx)
|
32
|
+
object = obj.object
|
33
|
+
database = (object.kind_of?(Hash) && object[:database]) ||
|
34
|
+
(object.respond_to?(:database) && object.database)
|
36
35
|
|
37
|
-
|
38
|
-
ctx
|
39
|
-
end
|
36
|
+
response = database ? cube.connected_to(database: database) do
|
37
|
+
execute_query(tree, ctx, object)
|
38
|
+
end : execute_query(tree, ctx, object)
|
40
39
|
|
41
40
|
ResponseBuilder.new tree, response
|
42
41
|
|
@@ -46,11 +45,10 @@ module Activecube
|
|
46
45
|
|
47
46
|
private
|
48
47
|
|
49
|
-
def execute_query tree, ctx
|
48
|
+
def execute_query tree, ctx, object
|
50
49
|
cube_query = tree.build_query
|
51
|
-
cube_query
|
52
|
-
|
53
|
-
ctx[:sql_io].puts(cube_query.to_sql) if ctx[:sql_io].respond_to?(:puts)
|
50
|
+
cube_query = object.append_cube_query(cube_query) if object.respond_to?(:append_cube_query)
|
51
|
+
cube_query.stats = ctx[:stats]
|
54
52
|
cube_query.query
|
55
53
|
end
|
56
54
|
|
@@ -47,9 +47,16 @@ module Activecube
|
|
47
47
|
|
48
48
|
def sort_node_arguments ast_node, arguments
|
49
49
|
if (options = arguments['options']).kind_of?(Hash)
|
50
|
-
|
51
|
-
x
|
52
|
-
|
50
|
+
if opt_keys_args = context_node.ast_node.arguments.detect{|x| x.name=='options'}.value.try(:arguments)
|
51
|
+
options_keys = opt_keys_args.map{|x|
|
52
|
+
x.name.underscore.to_sym
|
53
|
+
}
|
54
|
+
elsif opt_keys_args_opt_name = context_node.ast_node.arguments.detect{|x| x.name=='options'}.value.try(:name)
|
55
|
+
options_keys = context_node.query.variables[opt_keys_args_opt_name].arguments.argument_values.map{|x, y|
|
56
|
+
x.underscore.to_sym
|
57
|
+
}
|
58
|
+
end
|
59
|
+
|
53
60
|
arguments['options'] = Hash[
|
54
61
|
options_keys.collect{|key|
|
55
62
|
raise "Unmatched key #{key}" unless options[key]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activecube-graphql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.26
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aleksey Studnev
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activecube
|
@@ -90,10 +90,6 @@ extensions: []
|
|
90
90
|
extra_rdoc_files: []
|
91
91
|
files:
|
92
92
|
- ".gitignore"
|
93
|
-
- ".idea/activecube-graphql.iml"
|
94
|
-
- ".idea/misc.xml"
|
95
|
-
- ".idea/modules.xml"
|
96
|
-
- ".idea/workspace.xml"
|
97
93
|
- ".rspec"
|
98
94
|
- ".travis.yml"
|
99
95
|
- CODE_OF_CONDUCT.md
|
@@ -114,7 +110,7 @@ homepage: https://github.com/bitquery/activecube-graphql
|
|
114
110
|
licenses:
|
115
111
|
- MIT
|
116
112
|
metadata: {}
|
117
|
-
post_install_message:
|
113
|
+
post_install_message:
|
118
114
|
rdoc_options: []
|
119
115
|
require_paths:
|
120
116
|
- lib
|
@@ -129,8 +125,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
129
125
|
- !ruby/object:Gem::Version
|
130
126
|
version: '0'
|
131
127
|
requirements: []
|
132
|
-
rubygems_version: 3.0.
|
133
|
-
signing_key:
|
128
|
+
rubygems_version: 3.0.3
|
129
|
+
signing_key:
|
134
130
|
specification_version: 4
|
135
131
|
summary: Multi-Dimensional Queries using GraphQL
|
136
132
|
test_files: []
|
@@ -1,61 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<module type="RUBY_MODULE" version="4">
|
3
|
-
<component name="ModuleRunConfigurationManager">
|
4
|
-
<shared />
|
5
|
-
</component>
|
6
|
-
<component name="NewModuleRootManager">
|
7
|
-
<content url="file://$MODULE_DIR$">
|
8
|
-
<sourceFolder url="file://$MODULE_DIR$/features" isTestSource="true" />
|
9
|
-
<sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
|
10
|
-
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
|
11
|
-
</content>
|
12
|
-
<orderEntry type="jdk" jdkName="RVM: ruby-2.6.3" jdkType="RUBY_SDK" />
|
13
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
14
|
-
<orderEntry type="library" scope="PROVIDED" name="activecube (v0.1.34, RVM: ruby-2.6.3) [gem]" level="application" />
|
15
|
-
<orderEntry type="library" scope="PROVIDED" name="activemodel (v6.1.4, RVM: ruby-2.6.3) [gem]" level="application" />
|
16
|
-
<orderEntry type="library" scope="PROVIDED" name="activerecord (v6.1.4, RVM: ruby-2.6.3) [gem]" level="application" />
|
17
|
-
<orderEntry type="library" scope="PROVIDED" name="activesupport (v6.1.4, RVM: ruby-2.6.3) [gem]" level="application" />
|
18
|
-
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.17.3, RVM: ruby-2.6.3) [gem]" level="application" />
|
19
|
-
<orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.1.9, RVM: ruby-2.6.3) [gem]" level="application" />
|
20
|
-
<orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.3, RVM: ruby-2.6.3) [gem]" level="application" />
|
21
|
-
<orderEntry type="library" scope="PROVIDED" name="graphql (v1.12.19, RVM: ruby-2.6.3) [gem]" level="application" />
|
22
|
-
<orderEntry type="library" scope="PROVIDED" name="i18n (v1.8.11, RVM: ruby-2.6.3) [gem]" level="application" />
|
23
|
-
<orderEntry type="library" scope="PROVIDED" name="minitest (v5.14.4, RVM: ruby-2.6.3) [gem]" level="application" />
|
24
|
-
<orderEntry type="library" scope="PROVIDED" name="rake (v13.0.1, RVM: ruby-2.6.3) [gem]" level="application" />
|
25
|
-
<orderEntry type="library" scope="PROVIDED" name="rspec (v3.9.0, RVM: ruby-2.6.3) [gem]" level="application" />
|
26
|
-
<orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.9.2, RVM: ruby-2.6.3) [gem]" level="application" />
|
27
|
-
<orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.9.2, RVM: ruby-2.6.3) [gem]" level="application" />
|
28
|
-
<orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.9.1, RVM: ruby-2.6.3) [gem]" level="application" />
|
29
|
-
<orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.9.3, RVM: ruby-2.6.3) [gem]" level="application" />
|
30
|
-
<orderEntry type="library" scope="PROVIDED" name="tzinfo (v2.0.4, RVM: ruby-2.6.3) [gem]" level="application" />
|
31
|
-
<orderEntry type="library" scope="PROVIDED" name="zeitwerk (v2.5.1, RVM: ruby-2.6.3) [gem]" level="application" />
|
32
|
-
</component>
|
33
|
-
<component name="RakeTasksCache">
|
34
|
-
<option name="myRootTask">
|
35
|
-
<RakeTaskImpl id="rake">
|
36
|
-
<subtasks>
|
37
|
-
<RakeTaskImpl description="Build activecube-graphql-0.1.19.gem into the pkg directory" fullCommand="build" id="build" />
|
38
|
-
<RakeTaskImpl description="Remove any temporary products" fullCommand="clean" id="clean" />
|
39
|
-
<RakeTaskImpl description="Remove any generated files" fullCommand="clobber" id="clobber" />
|
40
|
-
<RakeTaskImpl description="Build and install activecube-graphql-0.1.19.gem into system gems" fullCommand="install" id="install" />
|
41
|
-
<RakeTaskImpl id="install">
|
42
|
-
<subtasks>
|
43
|
-
<RakeTaskImpl description="Build and install activecube-graphql-0.1.19.gem into system gems without network access" fullCommand="install:local" id="local" />
|
44
|
-
</subtasks>
|
45
|
-
</RakeTaskImpl>
|
46
|
-
<RakeTaskImpl description="Create tag v0.1.19 and build and push activecube-graphql-0.1.19.gem to rubygems.org" fullCommand="release[remote]" id="release[remote]" />
|
47
|
-
<RakeTaskImpl description="Run RSpec code examples" fullCommand="spec" id="spec" />
|
48
|
-
<RakeTaskImpl description="" fullCommand="default" id="default" />
|
49
|
-
<RakeTaskImpl description="" fullCommand="release" id="release" />
|
50
|
-
<RakeTaskImpl id="release">
|
51
|
-
<subtasks>
|
52
|
-
<RakeTaskImpl description="" fullCommand="release:guard_clean" id="guard_clean" />
|
53
|
-
<RakeTaskImpl description="" fullCommand="release:rubygem_push" id="rubygem_push" />
|
54
|
-
<RakeTaskImpl description="" fullCommand="release:source_control_push" id="source_control_push" />
|
55
|
-
</subtasks>
|
56
|
-
</RakeTaskImpl>
|
57
|
-
</subtasks>
|
58
|
-
</RakeTaskImpl>
|
59
|
-
</option>
|
60
|
-
</component>
|
61
|
-
</module>
|
data/.idea/misc.xml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<project version="4">
|
3
|
-
<component name="JavaScriptSettings">
|
4
|
-
<option name="languageLevel" value="ES6" />
|
5
|
-
</component>
|
6
|
-
<component name="ProjectRootManager" version="2" project-jdk-name="ruby-2.3.3-p222" project-jdk-type="RUBY_SDK" />
|
7
|
-
</project>
|
data/.idea/modules.xml
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<project version="4">
|
3
|
-
<component name="ProjectModuleManager">
|
4
|
-
<modules>
|
5
|
-
<module fileurl="file://$PROJECT_DIR$/.idea/activecube-graphql.iml" filepath="$PROJECT_DIR$/.idea/activecube-graphql.iml" />
|
6
|
-
</modules>
|
7
|
-
</component>
|
8
|
-
</project>
|
data/.idea/workspace.xml
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<project version="4">
|
3
|
-
<component name="ProjectId" id="1YAAllwtnwKyBVlMjptPbbPRXH8" />
|
4
|
-
<component name="ProjectViewState">
|
5
|
-
<option name="hideEmptyMiddlePackages" value="true" />
|
6
|
-
<option name="showLibraryContents" value="true" />
|
7
|
-
<option name="showMembers" value="true" />
|
8
|
-
</component>
|
9
|
-
<component name="PropertiesComponent">
|
10
|
-
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
|
11
|
-
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
|
12
|
-
<property name="settings.editor.selected.configurable" value="preferences.lookFeel" />
|
13
|
-
</component>
|
14
|
-
<component name="RunDashboard">
|
15
|
-
<option name="ruleStates">
|
16
|
-
<list>
|
17
|
-
<RuleState>
|
18
|
-
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
|
19
|
-
</RuleState>
|
20
|
-
<RuleState>
|
21
|
-
<option name="name" value="StatusDashboardGroupingRule" />
|
22
|
-
</RuleState>
|
23
|
-
</list>
|
24
|
-
</option>
|
25
|
-
</component>
|
26
|
-
</project>
|