Skip to content

Commit

Permalink
Removes unused method PostgresConnection#streaming_execute_query
Browse files Browse the repository at this point in the history
  • Loading branch information
aamine committed Oct 17, 2016
1 parent b7b9667 commit ef442ee
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions lib/bricolage/postgresconnection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -152,34 +152,6 @@ def query_batch(query, batch_size = 5000, &block)
}
end

def streaming_execute_query(query, &block)
in_exec = false
log_query query
log_elapsed_time {
in_exec = true
@connection.send_query(query)
}
@connection.set_single_row_mode
while rs = @connection.get_result
# NOTE: query processing is in progress until the first result set is returned.
in_exec = false
begin
rs.check
yield rs
ensure
rs.clear
end
end
rescue Interrupt
cancel_force if in_exec
raise
rescue PG::ConnectionBad, PG::UnableToSend => ex
@connection_failed = true
raise ConnectionError.wrap(ex)
rescue PG::Error => ex
raise PostgreSQLException.wrap(ex)
end

def in_transaction?
@connection.transaction_status == PG::Constants::PQTRANS_INTRANS
end
Expand Down

0 comments on commit ef442ee

Please sign in to comment.