Class: PGconn
Instance Method Summary collapse
Instance Method Details
#original_query ⇒ Object
462 |
# File 'lib/ap4r/message_store_ext.rb', line 462 alias original_query query |
#query(q, *bind_values, &block) ⇒ Object
464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 |
# File 'lib/ap4r/message_store_ext.rb', line 464 def query(q, *bind_values, &block) # In PGconn, +query+ method does NOT care about a given block. # To deal with a given block, this method adds iteration # over query results. maybe_result = exec(q, *bind_values) puts "PGconn: query called by #{q}" if $DEBUG puts "PGconn#query returns #{maybe_result}(class: #{maybe_result.class})." if $DEBUG return maybe_result unless block && maybe_result.kind_of?(PGresult) begin puts "PGconn extention: about to yield result." if $DEBUG block.call(maybe_result) ensure maybe_result.clear end end |
#quote(str) ⇒ Object
480 481 482 483 |
# File 'lib/ap4r/message_store_ext.rb', line 480 def quote str # do nothing str end |