Method: Qreport::Connection#run

Defined in:
lib/qreport/connection.rb

#run(sql, options = nil) ⇒ Object

options:

:arguments => { :key => value, ... }
:limit => size
:limit => [ size, offset ]


164
165
166
167
168
169
170
171
172
173
174
# File 'lib/qreport/connection.rb', line 164

def run sql, options = nil
  options ||= { }
  conn = options[:connection] || self.conn
  result = Query.new
  result.sql = sql
  result.options = options
  result.conn = self
  result.run!
  dump_result! result if @verbose_result || options[:verbose_result]
  result
end