mondrian-rest 0.7.0-java → 0.7.1-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile +0 -2
- data/lib/mondrian_rest/api.rb +9 -2
- data/lib/mondrian_rest/api_helpers.rb +5 -4
- data/mondrian-rest.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 0226d216ac38421203f90d11844887ffc2070fd3683afa867d8df8204fbc932f
|
4
|
+
data.tar.gz: 7e802242a410efcb28018191c255d8508635117b3c4472dac452c68b4658d01c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8e362c9aab9cd50df5dab2b1ecb808ba94dc60b0c80087d97a0d65be80cfe266f0e311fbe2f5ddbccad877ebf1a78c37d1908c9fae4babed1445a3444dc1f3d
|
7
|
+
data.tar.gz: 33173f228cc7151a9a4b39dd78a943cbfe36de11e3b5ada4f2f3fbd4a0711d3f4624e1f095ba22164e75b281e40b7ed2d209d2bc61e39a99c25b888d759834f6
|
data/Gemfile
CHANGED
data/lib/mondrian_rest/api.rb
CHANGED
@@ -33,10 +33,18 @@ module Mondrian::REST
|
|
33
33
|
|
34
34
|
desc "Execute an MDX query against a cube"
|
35
35
|
content_type :txt, "text/plain"
|
36
|
+
|
37
|
+
params do
|
38
|
+
optional :parents, type: Boolean, desc: "Include members' ancestors"
|
39
|
+
optional :debug, type: Boolean, desc: "Include generated MDX", default: false
|
40
|
+
optional :properties, type: Array, desc: "Include member properties"
|
41
|
+
optional :caption, type: Array, desc: "Replace caption with property", default: []
|
42
|
+
end
|
43
|
+
|
36
44
|
post do
|
37
45
|
status 200
|
38
46
|
|
39
|
-
rbody =
|
47
|
+
rbody = request.body.read.force_encoding('utf-8')
|
40
48
|
mdx(rbody)
|
41
49
|
end
|
42
50
|
end
|
@@ -198,7 +206,6 @@ module Mondrian::REST
|
|
198
206
|
end
|
199
207
|
|
200
208
|
get do
|
201
|
-
puts params.inspect
|
202
209
|
cube = get_cube_or_404(params[:cube_name])
|
203
210
|
dimension = cube.dimension(params[:dimension_name])
|
204
211
|
level = dimension.hierarchies[0].level(params[:level_name])
|
@@ -44,6 +44,11 @@ module Mondrian::REST
|
|
44
44
|
logger.info("Executing MDX query #{query}")
|
45
45
|
begin
|
46
46
|
result = olap.execute query
|
47
|
+
result.mdx = query if params[:debug]
|
48
|
+
result.properties = params[:properties]
|
49
|
+
result.caption_properties = params[:caption]
|
50
|
+
result.cube = Mondrian::OLAP::Cube.new(olap,
|
51
|
+
olap.raw_connection.prepareOlapStatement(query).getCube)
|
47
52
|
return result
|
48
53
|
rescue Mondrian::OLAP::Error => st
|
49
54
|
error!({error: st.backtrace}, 400)
|
@@ -56,11 +61,7 @@ module Mondrian::REST
|
|
56
61
|
mdx_query = query.to_mdx
|
57
62
|
|
58
63
|
result = mdx(query.to_mdx)
|
59
|
-
result.mdx = mdx_query if params[:debug]
|
60
|
-
result.properties = params[:properties]
|
61
|
-
result.caption_properties = params[:caption]
|
62
64
|
result.cube = cube
|
63
|
-
|
64
65
|
result
|
65
66
|
end
|
66
67
|
|
data/mondrian-rest.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mondrian-rest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Manuel Aristarán
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -215,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
215
215
|
requirements:
|
216
216
|
- jar no.ssb.jsonstat:json-stat-java, 0.2.2
|
217
217
|
rubyforge_project:
|
218
|
-
rubygems_version: 2.6.
|
218
|
+
rubygems_version: 2.6.11
|
219
219
|
signing_key:
|
220
220
|
specification_version: 4
|
221
221
|
summary: A REST interface for Mondrian ROLAP server
|