|
|
| db_len_t db::CursorRowAccessor::write_blob_final |
( |
int |
field, |
|
|
db_len_t |
offset, |
|
|
const void * |
data, |
|
|
db_len_t |
len | |
|
) |
| | [virtual, inherited] |
Write an array of bytes to the end of a BLOB (Binary Large OBject) field and truncate the BLOB to offset + len.
Because BLOBs can be arbitrarily large they must be written to in discrete sections. The byte array given by data will be stored at the offset position within the BLOB field.
write_blob_final should be used when updating a BLOB field and the new BLOB is smaller than the existing BLOB.
- Parameters:
-
| field | The index of the field that should be written to. Use find_field to obtain this index. (>=0, <# of fields) (required) |
| offset | The offset into the BLOB where data will be written. (>=0) |
| data | The byte array which will be written to the BLOB. |
| len | The lenth of data in bytes. (>=0`) |
- Returns:
- amount of data written to BLOB in bytes when successful, otherwise:
- Precondition:
- The table must be in DB_TABLE_BROWSING mode.
The row must already be inserted before calling write_blob_final.
- See also:
- write_blob, read_blob, get_blob_size, truncate_blob
Implements db::RowAccessor.
|