]> gitweb.michael.orlitzky.com - mailshears.git/blobdiff - lib/rm/plugins/roundcube.rb
lib,test: replace connection query() method with sync_exec{,_params}.
[mailshears.git] / lib / rm / plugins / roundcube.rb
index c7ccaa4ccba3865e3572afa396ed047ed9f5c83f..56c3108c354cf79d0b5017e025d8e7c64fb75a5a 100644 (file)
@@ -29,10 +29,10 @@ class RoundcubeRm
     # records associated with user_id too.
     sql_query = 'DELETE FROM users WHERE user_id = $1::int;'
 
-    connection = PG::Connection.connect(@db_hash)
+    connection = PG::Connection.new(@db_hash)
 
     begin
-      connection.query(sql_query, [user_id])
+      connection.sync_exec_params(sql_query, [user_id])
     ensure
       # Make sure the connection gets closed even if the query explodes.
       connection.close()