Back: DBI.FieldConverter-converting-smalltalk Up: DBI package Forward: DBI.ResultSet-accessing   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document

3.5 DBI.ResultSet

Defined in namespace DBI
Superclass: Stream
Category: DBI-Framework
I represent a result set, ie. the set of rows returned from a SELECT statement. I may also be returned for DML statements (INSERT, UPDATE, DELETE), in which case I only hold the number of rows affected.

3.5.1 DBI.ResultSet: accessing  (instance)
3.5.2 DBI.ResultSet: cursor access  (instance)
3.5.3 DBI.ResultSet: printing  (instance)
3.5.4 DBI.ResultSet: stream protocol  (instance)


3.5.1 DBI.ResultSet: accessing

columnAt: aIndex
Answer the aIndex'th column name.

columnNames
Answer an array of column names in order (abstract).

columns
Answer a Dictionary of column name -> ColumnInfo pairs (abstract).

isDML
Returns true if the statement was not a SELECT or similar operation (e.g. SHOW, DESCRIBE, EXPLAIN).

isSelect
Returns true if the statement was a SELECT or similar operation (e.g. SHOW, DESCRIBE, EXPLAIN), false otherwise.

rowCount
Returns the number of rows in the result set; error for DML statements.

rows
Answer the contents of the execution result as array of Rows.

rowsAffected
For DML statments, returns the number of rows affected; error for SELECT statements.

statement
Return the Statement, if any, that generated the result set.


3.5.2 DBI.ResultSet: cursor access

atEnd
Return whether all the rows in the result set have been consumed. (abstract).

fetch
Return the next row, or nil if at the end of the result set.

next
Return the next row, or raise an error if at the end of the stream (abstract).


3.5.3 DBI.ResultSet: printing

printOn: aStream
Print a representation of the receiver on aStream.


3.5.4 DBI.ResultSet: stream protocol

position
Returns the current row index (0-based) in the result set (abstract).

position: anInteger
Sets the current row index (0-based) in the result set (abstract).

size
Returns the number of rows in the result set.



Back: DBI.ResultSet-printing Up: DBI.ResultSet Forward: DBI.Row   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document


This document was generated on August, 19 2010 using texi2html