class Sequel::IBMDB::Statement
Wraps results returned by queries on IBM_DB.
Public Class Methods
new(stmt)
click to toggle source
Hold the given statement.
# File lib/sequel/adapters/ibmdb.rb, line 129 def initialize(stmt) @stmt = stmt end
Public Instance Methods
affected()
click to toggle source
Return the number of rows affected.
# File lib/sequel/adapters/ibmdb.rb, line 134 def affected IBM_DB.num_rows(@stmt) end
execute(*values)
click to toggle source
If this statement is a prepared statement, execute it on the database with the given values.
# File lib/sequel/adapters/ibmdb.rb, line 140 def execute(*values) IBM_DB.execute(@stmt, values) end
fetch_array()
click to toggle source
Return the results of a query as an array of values.
# File lib/sequel/adapters/ibmdb.rb, line 145 def fetch_array IBM_DB.fetch_array(@stmt) if @stmt end
field_name(ind)
click to toggle source
Return the field name at the given column in the result set.
# File lib/sequel/adapters/ibmdb.rb, line 150 def field_name(ind) IBM_DB.field_name(@stmt, ind) end
field_precision(key)
click to toggle source
Return the field precision for the given field name in the result set.
# File lib/sequel/adapters/ibmdb.rb, line 160 def field_precision(key) IBM_DB.field_precision(@stmt, key) end
field_type(key)
click to toggle source
Return the field type for the given field name in the result set.
# File lib/sequel/adapters/ibmdb.rb, line 155 def field_type(key) IBM_DB.field_type(@stmt, key) end
free()
click to toggle source
Free the memory related to this statement.
# File lib/sequel/adapters/ibmdb.rb, line 165 def free IBM_DB.free_stmt(@stmt) end
free_result()
click to toggle source
Free the memory related to this result set, only useful for prepared statements which have a different result set on every call.
# File lib/sequel/adapters/ibmdb.rb, line 171 def free_result IBM_DB.free_result(@stmt) end
num_fields()
click to toggle source
Return the number of fields in the result set.
# File lib/sequel/adapters/ibmdb.rb, line 176 def num_fields IBM_DB.num_fields(@stmt) end