rgviz-rails 0.17 → 0.18

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.
Files changed (2) hide show
  1. data/lib/rgviz_rails/executor.rb +7 -17
  2. metadata +3 -3
@@ -26,7 +26,6 @@ module Rgviz
26
26
 
27
27
  process_pivot
28
28
  process_labels
29
- process_options
30
29
 
31
30
  generate_columns
32
31
  generate_conditions
@@ -46,19 +45,6 @@ module Rgviz
46
45
  end
47
46
  end
48
47
 
49
- def process_options
50
- return unless @query.options.present?
51
-
52
- @query.options.each do |option|
53
- case option.option
54
- when Option::NoValues
55
- @no_values = true
56
- when Option::NoFormat
57
- @no_format = true
58
- end
59
- end
60
- end
61
-
62
48
  def process_pivot
63
49
  if @query.pivot
64
50
  @query.pivot.columns.each do |column|
@@ -172,7 +158,7 @@ module Rgviz
172
158
  i = 0
173
159
  @table.cols.each do |col|
174
160
  hash = {}
175
- hash[:v] = column_value(col, result.send("c#{i}")) unless @no_values
161
+ hash[:v] = column_value(col, result.send("c#{i}")) unless @query.options && @query.options.no_values
176
162
  row.c << Cell.new(hash)
177
163
  i += 1
178
164
  end
@@ -250,11 +236,15 @@ module Rgviz
250
236
  group_i = 0
251
237
  @original_columns.each_with_index do |original_column, i|
252
238
  if @group_bys.include?(original_column)
253
- row.c << (Cell.new :v => key[group_i])
239
+ hash = {}
240
+ hash[:v] = key[group_i] unless @query.options && @query.options.no_values
241
+ row.c << (Cell.new hash)
254
242
  group_i += 1
255
243
  elsif !@pivots.include?(original_column)
256
244
  uniq_pivots.each do |uniq_pivot|
257
- row.c << (Cell.new :v => value[uniq_pivot])
245
+ hash = {}
246
+ hash[:v] = value[uniq_pivot] unless @query.options && @query.options.no_values
247
+ row.c << (Cell.new hash)
258
248
  end
259
249
  end
260
250
  end
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rgviz-rails
3
3
  version: !ruby/object:Gem::Version
4
- hash: 41
4
+ hash: 47
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 17
9
- version: "0.17"
8
+ - 18
9
+ version: "0.18"
10
10
  platform: ruby
11
11
  authors:
12
12
  - Ary Borenszweig