fluiddb 0.0.26 → 0.0.27

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/FluidDb/Pgsql.rb +9 -3
  2. metadata +1 -1
@@ -94,15 +94,21 @@ module FluidDb
94
94
 
95
95
 
96
96
  def execute( sql, params, expected_affected_rows=nil )
97
- sql = self.format_to_sql( sql, params )
98
-
97
+ # sql = self.format_to_sql( sql, params )
98
+
99
99
  parts = sql.split( "?" )
100
100
  sql = ""
101
101
  parts.each_with_index do |p,idx|
102
102
  sql = sql + p;
103
103
  sql = sql + "$#{idx}" if idx > 0
104
104
  end
105
- r = @connection.exec_params( sql, params );
105
+
106
+ p = Array.new
107
+ params.each do |v|
108
+ p << Hash["value", v.to_s, "type", v.class.name, "format", 0]
109
+ end
110
+
111
+ r = @connection.exec_params( sql, p );
106
112
 
107
113
  if !expected_affected_rows.nil? and
108
114
  r.cmd_tuples != expected_affected_rows then
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.0.26
4
+ version: 0.0.27
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: