rgviz-rails 0.22 → 0.23
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.
- data/lib/rgviz_rails/executor.rb +2 -2
- data/rails/init.rb +4 -0
- data/spec/rgviz/executor_spec.rb +4 -0
- metadata +4 -4
data/lib/rgviz_rails/executor.rb
CHANGED
@@ -401,13 +401,13 @@ module Rgviz
|
|
401
401
|
case node.function
|
402
402
|
when ScalarFunctionColumn::Sum, ScalarFunctionColumn::Difference,
|
403
403
|
ScalarFunctionColumn::Product, ScalarFunctionColumn::Quotient
|
404
|
-
@string += "("
|
404
|
+
@string += "("
|
405
405
|
node.arguments[0].accept self
|
406
406
|
@string += node.function.to_s
|
407
407
|
node.arguments[1].accept self
|
408
408
|
@string += ")"
|
409
409
|
else
|
410
|
-
@
|
410
|
+
@executor.adapter.accept_scalar_function_column(node, self)
|
411
411
|
end
|
412
412
|
false
|
413
413
|
end
|
data/rails/init.rb
CHANGED
data/spec/rgviz/executor_spec.rb
CHANGED
@@ -128,6 +128,10 @@ describe Executor do
|
|
128
128
|
Person.make :age => nil, :name => 'b'
|
129
129
|
end
|
130
130
|
|
131
|
+
it_processes_single_select_column "age where city_name = 'Laos' and year(birthday) = '2010'", 'age', :number, 1, 'age' do
|
132
|
+
Person.make :age => 1, :name => 'a', :city => City.make(:name => 'Laos'), :birthday => '2010-01-01'
|
133
|
+
end
|
134
|
+
|
131
135
|
it_processes_single_select_column 'name where age is not null', 'name', :string, 'a', 'name' do
|
132
136
|
Person.make :age => 1, :name => 'a'
|
133
137
|
Person.make :age => nil, :name => 'b'
|
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:
|
4
|
+
hash: 37
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: "0.
|
8
|
+
- 23
|
9
|
+
version: "0.23"
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Ary Borenszweig
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-08-
|
17
|
+
date: 2010-08-19 00:00:00 +07:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|