KI_WS_READ_NEXT
Argument | Enumeration | Purpose |
---|---|---|
handle | Handle | |
SYM(rowbuf$()) | Row buffer or row buffer array | |
nRows | Rows to read | |
status | KDB_ERROR_ENUM | Return status |
SYM(rowid$()) | Row ID or rowid array | |
nRowsRead | Rows read |
KI_WS_READ_NEXT
This gets the next nRows rows from the rowset created by KI_WS_START. If nRows is zero or omitted then 1 row will be fetched. The row buffer array rowbuf$() should be sized to by an array of at least nRows records. The number of rows actually read will be returned in nRowsRead. This may be less than nRows when reading the last rows in the result set. When the end of the rowset has been reached a subsequent call will set a status of KE_ENDOFFILE and nRowsRead will be zero.
The corresponding ROWIDs for the rows may be obtained by passing the SYM of an array rowid$() which should have at least nRows elements each sized to the ROWID size for the connection.
The SYM arguments, for the row and the rowid, may be passed as scalar strings provided their length is big enough to hold the elements. The row must still be a SYM so that view information can be checked. Any or all of these SYMs may be zero if that information is not required.
Reading arrays rather than one row at a time is a performance gain on SQL databases if the index has been redirected with KI_REDIR_CONNECT.
This function is only available for KDB type 7 and SQL database tables. The word search index must first have been created with a CREATE WORD INDEX statement.