KI_START_FIRST
Argument | Enumeration | Purpose |
---|---|---|
handle | Handle | |
keys$ | Row's key | |
path | Path number | |
nCols | Number of significant columns in a compound key | |
max_rows | Max rows to return | |
bSkipMatch | Skip matching row | |
sql | SQL Where Handle | |
status | KDB_ERROR_ENUM | Return status |
KI_START_FIRST
This function is very similar to KI_START, with the difference that the maximum number of rows that can be returned with subsequent KI_READ_NEXTs is limited to max_rows rows. The cols parameter is used to control the number of significant leading columns in the key, any insignificant columns will be set to 0x00 or 0xFF as appropriate. Setting the column count to zero implies that all of the columns will be used from the supplied key.
If the optional bSkipMatch flag is set to TRUE then the first rows in the result set are not returned if they match the supplied key. For positive path values a subsequent KI_READ_NEXT will read the first row with a key greater than the supplied key. For negative path values a subsequent KI_READ_NEXT a subsequent KI_READ_NEXT on the same negative path will read the last row with a key less than the supplied key.
As of KCML 6.60, all the functionality of KI_START_FIRST is available in KI_START and KI_START_ROW. KI_START_ROW is to be preferred in new applications as the use of a row buffer allows KCML to specify the number of columns required which has performance advantages in 2-tier SQL databases.