fluiddb 0.1.7 → 0.1.8
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/FluidDb.rb +12 -8
- metadata +2 -2
data/lib/FluidDb.rb
CHANGED
@@ -75,19 +75,23 @@ module FluidDb
|
|
75
75
|
|
76
76
|
params.each_with_index do |v, idx|
|
77
77
|
if v.kind_of? String then
|
78
|
-
|
79
|
-
#
|
80
|
-
|
78
|
+
v = "'" + self.escape_string( v ) + "'"
|
79
|
+
#v = "'" + v.sub( "'", "\'" ) + "'"
|
80
|
+
elsif v.is_a? DateTime then
|
81
81
|
v = "'" + v.strftime( "%Y-%m-%d %H:%M:%S" ) + "'"
|
82
|
-
|
82
|
+
elsif v.is_a? Time then
|
83
83
|
v = "'" + v.strftime( "%Y-%m-%d %H:%M:%S" ) + "'"
|
84
|
-
|
84
|
+
elsif v.kind_of? Date then
|
85
85
|
v = "'" + v.to_s + "'"
|
86
|
-
|
86
|
+
elsif v.is_a? Numeric then
|
87
87
|
v = v.to_s
|
88
|
-
|
88
|
+
elsif v.is_a? TrueClass then
|
89
|
+
v = "true"
|
90
|
+
elsif v.is_a? FalseClass then
|
91
|
+
v = "false"
|
92
|
+
elsif v.nil? then
|
89
93
|
v = 'NULL'
|
90
|
-
|
94
|
+
else
|
91
95
|
raise ParamTypeNotSupportedError.new( "Name of unknown param type, #{v.class.name}, for sql, #{sql}" )
|
92
96
|
end
|
93
97
|
params[idx] = v
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluiddb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-10-10 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: A semantic layer for db interaction
|
15
15
|
email: guy@guyirvine.com
|