rgviz-rails 0.68 → 0.69

Sign up to get free protection for your applications and to get access to all the features.
@@ -27,9 +27,9 @@ module Rgviz
27
27
  node.arguments[0].accept visitor
28
28
  visitor << ")"
29
29
  when ScalarFunctionColumn::Millisecond
30
- raise NotSupported.new("The millisecond function is not supported")
30
+ raise NotSupported.new("The millisecond function is not supported in SQLite")
31
31
  when ScalarFunctionColumn::Quarter
32
- raise NotSupported.new("The quarter function is not supported")
32
+ raise NotSupported.new("The quarter function is not supported in SQLite")
33
33
  when ScalarFunctionColumn::DayOfWeek
34
34
  visitor << "1 + strftime('%w', "
35
35
  node.arguments[0].accept visitor
@@ -509,6 +509,14 @@ module Rgviz
509
509
  @string += node.function.to_s
510
510
  node.arguments[1].accept self
511
511
  @string += ")"
512
+ when ScalarFunctionColumn::Round
513
+ @string += "round("
514
+ node.arguments[0].accept self
515
+ @string += ")"
516
+ when ScalarFunctionColumn::Floor
517
+ @string += "round("
518
+ node.arguments[0].accept self
519
+ @string += ")"
512
520
  else
513
521
  @executor.adapter.accept_scalar_function_column(node, self)
514
522
  end
@@ -140,10 +140,12 @@ module Rgviz
140
140
  out << "function rgviz_append(s, b, a) {\n"
141
141
  out << "var q = '';\n"
142
142
  out << "if (s.length == 0) {\n"
143
- out << "q += '1 = 2';\n";
143
+ out << "q += '1 = 2';\n"
144
+ out << "} else if (s.length == 1 && s[0] == 'rgviz_all') {\n"
145
+ out << "q += '1 = 1';\n"
144
146
  out << "} else {\n"
145
147
  out << "if (s.length > 1) q += '(';\n"
146
- out << "for(var i = 0; i < s.length; i++) {\n";
148
+ out << "for(var i = 0; i < s.length; i++) {\n"
147
149
  out << "if (i > 0) q += ' or ';\n"
148
150
  out << "q += b + s[i] + a;\n"
149
151
  out << "}";
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rgviz-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.68'
4
+ version: '0.69'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-07-23 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rgviz
16
- requirement: &70314626649780 !ruby/object:Gem::Requirement
16
+ requirement: &70265901446180 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0.46'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70314626649780
24
+ version_requirements: *70265901446180
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rails
27
- requirement: &70314626649300 !ruby/object:Gem::Requirement
27
+ requirement: &70265901445700 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70314626649300
35
+ version_requirements: *70265901445700
36
36
  description:
37
37
  email: aborenszweig@manas.com.ar
38
38
  executables: []