Method: DBI::StatementHandle#initialize
- Defined in:
- lib/dbi/handles/statement.rb
#initialize(handle, fetchable = false, prepared = true, convert_types = true, executed = false) ⇒ StatementHandle
Returns a new instance of StatementHandle.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/dbi/handles/statement.rb', line 17 def initialize(handle, fetchable=false, prepared=true, convert_types=true, executed=false) super(handle) @fetchable = fetchable @prepared = prepared # only false if immediate execute was used @executed = executed # only true if the statement was already executed. @cols = nil @coltypes = nil @convert_types = convert_types if @fetchable @row = DBI::Row.new(column_names, column_types, nil, @convert_types) else @row = nil end end |