Permalink
Browse files

In Connection::prepare!, return the Statement

In Connection#execute!, return the Result
  • Loading branch information...
1 parent b8c8bd5 commit ee28d87a0a015a3fce12fa3726f2a32f30745218 Jim Cain committed Mar 19, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/moses_pg/sync.rb
View
@@ -140,6 +140,7 @@ class Statement
def self.prepare!(connection, sql, datatypes = nil)
result = EM::Synchrony.sync(prepare(connection, sql, datatypes))
raise MosesPG::Error, result if String === result
+ result
end
#
@@ -171,7 +172,7 @@ def bind!(*bindvars)
def execute!(*bindvars)
result = EM::Synchrony.sync(execute(*bindvars))
raise MosesPG::Error, result if String === result
- self
+ result
end
#

0 comments on commit ee28d87

Please sign in to comment.