.Dd January 24, 2024
.Dt SQLITE3_BLOB_REOPEN 3
.Os
.Sh NAME
.Nm sqlite3_blob_reopen
.Nd move a BLOB handle to a new row
.Sh SYNOPSIS
.In sqlite3.h
.Ft int
.Fo sqlite3_blob_reopen
.Fa "sqlite3_blob *"
.Fa "sqlite3_int64"
.Fc
.Sh DESCRIPTION
This function is used to move an existing BLOB handle so
that it points to a different row of the same database table.
The new row is identified by the rowid value passed as the second argument.
Only the row can be changed.
The database, table and column on which the blob handle is open remain
the same.
Moving an existing BLOB handle to a new row is faster than
closing the existing handle and opening a new one.
.Pp
The new row must meet the same criteria as for
.Fn sqlite3_blob_open
- it must exist and there must be either a blob or text value stored
in the nominated column.
If the new row is not present in the table, or if it does not contain
a blob or text value, or if another error occurs, an SQLite error code
is returned and the blob handle is considered aborted.
All subsequent calls to
.Fn sqlite3_blob_read ,
.Fn sqlite3_blob_write
or
.Fn sqlite3_blob_reopen
on an aborted blob handle immediately return SQLITE_ABORT.
Calling
.Fn sqlite3_blob_bytes
on an aborted blob handle always returns zero.
.Pp
This function sets the database handle error code and message.
.Sh IMPLEMENTATION NOTES
These declarations were extracted from the
interface documentation at line 7776.
.Bd -literal
SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
.Ed
.Sh SEE ALSO
.Xr sqlite3_blob 3 ,
.Xr sqlite3_blob_bytes 3 ,
.Xr sqlite3_blob_open 3 ,
.Xr sqlite3_blob_read 3 ,
.Xr sqlite3_blob_write 3