Result (gb.db2)

This class represents the result of a SQL request.

Esta clase es instanciable.

Esta clase actúa como un array de lectura / escritura.

Esta clase es enumerable con la palabra clave FOR EACH.

Propiedades
Available   Returns True if the result object contains one or more accessible database rows.
Connection   Returns the parent connection object.
Count   Returns the number of rows in the query result.
Editable   Return if the result is editable.
Fields   Return a collection of all result fields.
Index   Returns the index of the current record, starting from zero.
Length   This is a synonymous for the Count property.
Max   Returns Result.Count - 1 (and so it returns -1 if there is no record).

Métodos
All   Return the value of the specified field of each result record as an array.
Delete   Deletes the current record.
MoveFirst   Moves to the first record of the result.
MoveLast   Moves to the last record of the result.
MoveNext   Moves to the next record of the result.
MovePrevious   Moves to the previous record of the result.
MoveTo   Moves to a specified record.
Reset   Undo any change done to a result created by the Create or Connection method.
Update   Updates the current record into the database, if this record has been modified and if the Result is a writable cursor.

Result objects are not database cursors, but a copy of database records. And so they are not synchronized with successive database changes.

There are two types of result objects, depending on the method used for creating them.

Method Result Type
create Editable
edit Editable
exec Read-only
find Read-only