KI_READ

Indexed Read

Synopsis:
CALL KI_READ handle, keys$, path, SYM(rowbuf$), [eLockType], [bQuery] TO status, [rowid$]
'ki_read( handle, keys$, path, SYM(rowbuf$), [eLockType], [bQuery], [rowid$] )
ArgumentEnumerationPurpose
handleHandle
keys$Key
pathIndex path
SYM(rowbuf$)Symbol of a buffer
eLockTypeKCML_KDB_LOCK_ENUMOptional lock type
bQueryForce use of DEFQUERY
statusKDB_ERROR_ENUMReturn code
rowid$Pointer to row
>KI_READ

KI_READ

Reads row with key key$ on path path into buffer whose index is sym. If the read was successful, then the stub variable ki_dataptr$ will contain a pointer to the row. If the read failed, then a status of KE_NOTFOUND will be returned and the rowid ki_dataptr$ will be ALL(00).

If the row buffer was DIMensioned using a DEFVIEW then only the columns of view will be guaranteed to be read. The other columns will be undefined. Using a view can give significant performance improvements on an SQL database.

The row can be locked by setting the optional eLockType argument to one of the enumerated constants. The lock can be either a short term transactional lock or a long term lock. This is an alternative to calling KI_READ_HOLD to take a transactional lock.

History
Introduced in KCML 3.00
See Also:
KI_BUILD, KI_COPY_TABLE, KI_CREATE, KI_CREATE_TMP, KI_DELETE, KI_DELETE_ROWS, KI_DELETE_WHERE, KI_END, KI_ERROR, KI_ERROR_TEXT, KI_FETCH, KI_GET_ERROR_TEXT, KI_GET_SERIAL, KI_GROW, KI_INFO, KI_INITIALISE, KI_LOCK_ALL, KI_LOCK_OWNER, KI_MOVE_ROWS, KI_MOVE_TABLE, KI_OPEN, KI_READ_ARRAY, KI_READ_HOLD, KI_READ_HOLD_NEXT, KI_READ_HOLD_PTR, KI_READ_NEXT, KI_READ_PTR, KI_READ_RANDOM, KI_READ_RAW, KI_REBUILD, KI_REWRITE, KI_SET_EXTENT, KI_SET_ROWS, KI_SET_SERIAL, KI_SET_WLOCK_COUNT, KI_SIZE_FILE, KI_START, KI_START_BEG, KI_START_BETWEEN, KI_START_FIRST, KI_START_ON, KI_START_ROW, KI_START_ROW_BETWEEN, KI_UNLOCK, KI_UNLOCK_FILE, KI_VERIFY, KI_WMODE_BITMAP, KI_WRITE, KI_WRITE_PTR, KI_WRITE_RAW, KI_WS_CREATE, KI_WS_DELETE, KI_WS_OPEN, KI_WS_READ, KI_WS_REWRITE, KI_WS_WRITE
KCML database status codes