KI_DELETE

Remove a row

Synopsis:
CALL KI_DELETE handle, rowid$ TO status
status = 'ki_delete( handle, rowid$ )
ArgumentEnumerationPurpose
handleHandle
rowid$Location of row
statusKDB_ERROR_ENUMReturn status
>KI_DELETE

KI_DELETE

Removes the currently locked row with ROWID rowid$ from the table. Any index entries are also deleted. For consistency the row should have been previously held with a KI_READ_HOLD, KI_READ_HOLD_NEXT or KI_READ_HOLD_PTR which returned the rowid in rowid$.

If lock tracking is enabled on the connection then it will be an error to delete a row that was not previously held.

If an implicit transaction was started by taking a lock on a row with KI_READ_HOLD the implicit transaction will be committed when that row is deleted with KI_DELETE.

A delete of a row with a long term lock will free the long term lock. If done inside a transaction then the unlock will take place when the transaction is committed.

History
Introduced in KCML 3.00
See Also:
KI_BUILD, KI_DELETE_ROWS, KI_DELETE_WHERE, KI_END, KI_ERROR, KI_ERROR_TEXT, KI_FETCH, KI_GET_ERROR_TEXT, KI_LOCK_OWNER, KI_MOVE_ROWS, KI_READ, 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_REWRITE, KI_SET_ROWS, KI_START, KI_START_BEG, KI_START_BETWEEN, KI_START_FIRST, KI_START_ON, KI_START_ROW, KI_START_ROW_BETWEEN, KI_UNLOCK, KI_WRITE, KI_WRITE_PTR, KI_WRITE_RAW
KCML database status codes