Wraps results returned by queries on IBM_DB.
Methods
Public Class
Public Instance
Public Class methods
new(stmt)
Hold the given statement.
[show source]
# File lib/sequel/adapters/ibmdb.rb 124 def initialize(stmt) 125 @stmt = stmt 126 end
Public Instance methods
affected()
Return the number of rows affected.
[show source]
# File lib/sequel/adapters/ibmdb.rb 129 def affected 130 IBM_DB.num_rows(@stmt) 131 end
execute(*values)
If this statement is a prepared statement, execute it on the database with the given values.
[show source]
# File lib/sequel/adapters/ibmdb.rb 135 def execute(*values) 136 IBM_DB.execute(@stmt, values) 137 end
fetch_array()
Return the results of a query as an array of values.
[show source]
# File lib/sequel/adapters/ibmdb.rb 140 def fetch_array 141 IBM_DB.fetch_array(@stmt) if @stmt 142 end
field_name(ind)
Return the field name at the given column in the result set.
[show source]
# File lib/sequel/adapters/ibmdb.rb 145 def field_name(ind) 146 IBM_DB.field_name(@stmt, ind) 147 end
field_precision(key)
Return the field precision for the given field name in the result set.
[show source]
# File lib/sequel/adapters/ibmdb.rb 155 def field_precision(key) 156 IBM_DB.field_precision(@stmt, key) 157 end
field_type(key)
Return the field type for the given field name in the result set.
[show source]
# File lib/sequel/adapters/ibmdb.rb 150 def field_type(key) 151 IBM_DB.field_type(@stmt, key) 152 end
free()
Free the memory related to this statement.
[show source]
# File lib/sequel/adapters/ibmdb.rb 160 def free 161 IBM_DB.free_stmt(@stmt) 162 end
free_result()
Free the memory related to this result set, only useful for prepared statements which have a different result set on every call.
[show source]
# File lib/sequel/adapters/ibmdb.rb 166 def free_result 167 IBM_DB.free_result(@stmt) 168 end
num_fields()
Return the number of fields in the result set.
[show source]
# File lib/sequel/adapters/ibmdb.rb 171 def num_fields 172 IBM_DB.num_fields(@stmt) 173 end