fluiddb 0.0.25 → 0.0.26

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 +8 -1
  2. metadata +1 -1
data/lib/FluidDb/Pgsql.rb CHANGED
@@ -95,8 +95,15 @@ module FluidDb
95
95
 
96
96
  def execute( sql, params, expected_affected_rows=nil )
97
97
  sql = self.format_to_sql( sql, params )
98
- r = @connection.query( sql );
99
98
 
99
+ parts = sql.split( "?" )
100
+ sql = ""
101
+ parts.each_with_index do |p,idx|
102
+ sql = sql + p;
103
+ sql = sql + "$#{idx}" if idx > 0
104
+ end
105
+ r = @connection.exec_params( sql, params );
106
+
100
107
  if !expected_affected_rows.nil? and
101
108
  r.cmd_tuples != expected_affected_rows then
102
109
  raise ExpectedAffectedRowsError.new( "Expected affected rows, #{expected_affected_rows}, Actual affected rows, #{r.cmd_tuples}")
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.25
4
+ version: 0.0.26
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: