activecube 0.1.19 → 0.1.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/activecube/cube_definition.rb +5 -1
- data/lib/activecube/query/cube_query.rb +10 -0
- data/lib/activecube/query/option.rb +17 -0
- data/lib/activecube/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4761a4080baea000688c32cd35753b72f0fd51d7e6a0818da31c8bd5141f966
|
4
|
+
data.tar.gz: e5116aa48a23176bd91f4e90bbf6d83ac300c09aa3c04a951afbe8eeb3918133
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2638118ea471ff784d1689a86dde10a535dcfd0e4eabeb93a9b6206236f116017ffe5d08de03820adb45d5e4291b42ca853c755efa5cddf37d664a09e3122ea9
|
7
|
+
data.tar.gz: 6339c6bad22e0c0fbebbd2e8987ccac2085374fa31e274c902963b5de5b8f5dd6531b19dc95c79ccf9e1722ee277bb469a1bddc03d41d991d8fe64cafa61c63e
|
data/Gemfile.lock
CHANGED
@@ -18,7 +18,7 @@ module Activecube
|
|
18
18
|
|
19
19
|
end
|
20
20
|
|
21
|
-
attr_reader :dimensions, :metrics, :selectors, :models
|
21
|
+
attr_reader :dimensions, :metrics, :selectors, :models, :options
|
22
22
|
|
23
23
|
def inspect
|
24
24
|
name +
|
@@ -46,6 +46,10 @@ module Activecube
|
|
46
46
|
store_definition_array! 'model', (@models ||= []), [*args].flatten.map{|t| t }
|
47
47
|
end
|
48
48
|
|
49
|
+
def option *args
|
50
|
+
store_definition_array! 'option', (@options ||= []), [*args].flatten.map{|t| t }
|
51
|
+
end
|
52
|
+
|
49
53
|
def dim_column column_name
|
50
54
|
Class.new(Activecube::Dimension) do
|
51
55
|
column column_name
|
@@ -3,6 +3,7 @@ require 'activecube/query/item'
|
|
3
3
|
require 'activecube/query/limit'
|
4
4
|
require 'activecube/query/measure'
|
5
5
|
require 'activecube/query/ordering'
|
6
|
+
require 'activecube/query/option'
|
6
7
|
require 'activecube/query/selector'
|
7
8
|
require 'activecube/query/slice'
|
8
9
|
|
@@ -20,9 +21,18 @@ module Activecube::Query
|
|
20
21
|
@measures = measures
|
21
22
|
@selectors = selectors
|
22
23
|
@options = options
|
24
|
+
|
23
25
|
@tables = model_tables || cube.models.map{|m|
|
24
26
|
m < Activecube::View ? m.new : Activecube::Processor::Table.new(m)
|
25
27
|
}
|
28
|
+
|
29
|
+
cube.options && cube.options.each do |option|
|
30
|
+
define_singleton_method option.to_s.underscore do |*args|
|
31
|
+
@options << Option.new(option, *args)
|
32
|
+
self
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
26
36
|
end
|
27
37
|
|
28
38
|
def slice *args
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Activecube
|
2
|
+
module Query
|
3
|
+
class Option
|
4
|
+
|
5
|
+
attr_reader :argument, :value
|
6
|
+
def initialize argument, value
|
7
|
+
@argument = argument
|
8
|
+
@value = value
|
9
|
+
end
|
10
|
+
|
11
|
+
def append_query _model, _cube_query, _table, query
|
12
|
+
query
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/lib/activecube/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activecube
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.23
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aleksey Studnev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -111,6 +111,7 @@ files:
|
|
111
111
|
- lib/activecube/query/measure.rb
|
112
112
|
- lib/activecube/query/measure_nothing.rb
|
113
113
|
- lib/activecube/query/modification.rb
|
114
|
+
- lib/activecube/query/option.rb
|
114
115
|
- lib/activecube/query/ordering.rb
|
115
116
|
- lib/activecube/query/selector.rb
|
116
117
|
- lib/activecube/query/slice.rb
|