Result
First
move the cursor to the first row
Calling Sequence
Parameters
Description
Examples
result:-First( opts )
result
-
Result module
'opts
(optional) equation of the form before=boolean
First moves the row cursor maintained within result to the first row of the table.
First accepts one optional argument.
before = boolean
If before is true, then the row cursor is moved to the row before the first row containing data, that is, the same location as when a Result module is created.
First returns true if the new row indicated by the cursor is a row containing data. When called with before=true, First always returns false.
Create a Result.
driver≔DatabaseLoadDriver⁡:
conn≔driver:-OpenConnection⁡url,name,pass:res≔conn:-ExecuteQuery⁡SELECT name FROM animals:
Move the row cursor.
whileres:-Next⁡dores:-GetData⁡1enddo:
Now call First.
res:-First⁡
true
First returned true so it is valid to read data from this row.
res:-GetData⁡1
fish
res:-First⁡before=true
false
res:-Next⁡
See Also
Database
Database[Result]
Database[Result][GotoRow]
Database[Result][Last]
Database[Result][Next]
Database[Result][Previous]
Database[usage]
Download Help Document