rgviz-rails 0.50 → 0.51
Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc
CHANGED
@@ -118,7 +118,7 @@ You can also apply a query over an array of arrays that contains your "records"
|
|
118
118
|
This is very useful if you need to present visualizations against data coming from a CSV file.
|
119
119
|
|
120
120
|
=== Current Limitations
|
121
|
-
* The *format* clause is
|
121
|
+
* The *format* clause works, but formatting is as in ruby (like "%.2f" for numbers, "foo %s bar" for strings, and "%Y-%m-%d" for dates, as specified by Time#strftime)
|
122
122
|
* Only supports MySQL, PostgreSQL and SQLite adapters
|
123
123
|
* These scalar functions are not supported for SQLite: *millisecond*, *quarter*
|
124
124
|
* These scalar functions are not supported for MySQL: *millisecond*
|
@@ -65,5 +65,17 @@ module Rgviz
|
|
65
65
|
visitor << ")"
|
66
66
|
end
|
67
67
|
end
|
68
|
+
|
69
|
+
def visit_date_column(node, visitor)
|
70
|
+
visitor << "date #{visitor.escaped_string(node.value.strftime("%Y-%m-%d"))}"
|
71
|
+
end
|
72
|
+
|
73
|
+
def visit_date_time_column(node, visitor)
|
74
|
+
visitor << "timestamp #{visitor.escaped_string(node.value.strftime("%Y-%m-%d %H:%M:%S"))}"
|
75
|
+
end
|
76
|
+
|
77
|
+
def visit_time_of_day_column(node, visitor)
|
78
|
+
visitor << "time #{visitor.escaped_string(node.value.strftime("%H:%M:%S"))}"
|
79
|
+
end
|
68
80
|
end
|
69
81
|
end
|
@@ -71,5 +71,17 @@ module Rgviz
|
|
71
71
|
visitor << ")"
|
72
72
|
end
|
73
73
|
end
|
74
|
+
|
75
|
+
def visit_date_column(node, visitor)
|
76
|
+
visitor << "#{visitor.escaped_string(node.value.strftime("%Y-%m-%d"))}"
|
77
|
+
end
|
78
|
+
|
79
|
+
def visit_date_time_column(node, visitor)
|
80
|
+
visitor << "#{visitor.escaped_string(node.value.strftime("%Y-%m-%d %H:%M:%S"))}"
|
81
|
+
end
|
82
|
+
|
83
|
+
def visit_time_of_day_column(node, visitor)
|
84
|
+
visitor << "#{visitor.escaped_string(node.value.strftime("%H:%M:%S"))}"
|
85
|
+
end
|
74
86
|
end
|
75
87
|
end
|
@@ -63,5 +63,17 @@ module Rgviz
|
|
63
63
|
visitor << ")"
|
64
64
|
end
|
65
65
|
end
|
66
|
+
|
67
|
+
def visit_date_column(node, visitor)
|
68
|
+
visitor << "#{visitor.escaped_string(node.value.strftime("%Y-%m-%d"))}"
|
69
|
+
end
|
70
|
+
|
71
|
+
def visit_date_time_column(node, visitor)
|
72
|
+
visitor << "#{visitor.escaped_string(node.value.strftime("%Y-%m-%d %H:%M:%S"))}"
|
73
|
+
end
|
74
|
+
|
75
|
+
def visit_time_of_day_column(node, visitor)
|
76
|
+
visitor << "#{visitor.escaped_string(node.value.strftime("%H:%M:%S"))}"
|
77
|
+
end
|
66
78
|
end
|
67
79
|
end
|
data/lib/rgviz_rails/executor.rb
CHANGED
@@ -454,15 +454,15 @@ module Rgviz
|
|
454
454
|
end
|
455
455
|
|
456
456
|
def visit_date_column(node)
|
457
|
-
@
|
457
|
+
@executor.adapter.visit_date_column node, self
|
458
458
|
end
|
459
459
|
|
460
460
|
def visit_date_time_column(node)
|
461
|
-
@
|
461
|
+
@executor.adapter.visit_date_time_column node, self
|
462
462
|
end
|
463
463
|
|
464
464
|
def visit_time_of_day_column(node)
|
465
|
-
@
|
465
|
+
@executor.adapter.visit_time_of_day_column node, self
|
466
466
|
end
|
467
467
|
|
468
468
|
def visit_scalar_function_column(node)
|
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.
|
4
|
+
version: '0.51'
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-01-
|
12
|
+
date: 2012-01-18 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rgviz
|
16
|
-
requirement: &
|
16
|
+
requirement: &70132136604300 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70132136604300
|
25
25
|
description:
|
26
26
|
email: aborenszweig@manas.com.ar
|
27
27
|
executables: []
|
@@ -47,7 +47,7 @@ files:
|
|
47
47
|
- spec/models/person.rb
|
48
48
|
- spec/rgviz/executor_spec.rb
|
49
49
|
- README.rdoc
|
50
|
-
homepage: http://
|
50
|
+
homepage: http://github.com/asterite/rgviz-rails
|
51
51
|
licenses: []
|
52
52
|
post_install_message:
|
53
53
|
rdoc_options: []
|