xref: /netbsd-src/external/public-domain/sqlite/man/sqlite3_blob_reopen.3 (revision b9988867a8ad969c45a52aa7628bc932ec98d46b)
1.Dd January 24, 2024
2.Dt SQLITE3_BLOB_REOPEN 3
3.Os
4.Sh NAME
5.Nm sqlite3_blob_reopen
6.Nd move a BLOB handle to a new row
7.Sh SYNOPSIS
8.In sqlite3.h
9.Ft int
10.Fo sqlite3_blob_reopen
11.Fa "sqlite3_blob *"
12.Fa "sqlite3_int64"
13.Fc
14.Sh DESCRIPTION
15This function is used to move an existing BLOB handle so
16that it points to a different row of the same database table.
17The new row is identified by the rowid value passed as the second argument.
18Only the row can be changed.
19The database, table and column on which the blob handle is open remain
20the same.
21Moving an existing BLOB handle to a new row is faster than
22closing the existing handle and opening a new one.
23.Pp
24The new row must meet the same criteria as for
25.Fn sqlite3_blob_open
26- it must exist and there must be either a blob or text value stored
27in the nominated column.
28If the new row is not present in the table, or if it does not contain
29a blob or text value, or if another error occurs, an SQLite error code
30is returned and the blob handle is considered aborted.
31All subsequent calls to
32.Fn sqlite3_blob_read ,
33.Fn sqlite3_blob_write
34or
35.Fn sqlite3_blob_reopen
36on an aborted blob handle immediately return SQLITE_ABORT.
37Calling
38.Fn sqlite3_blob_bytes
39on an aborted blob handle always returns zero.
40.Pp
41This function sets the database handle error code and message.
42.Sh IMPLEMENTATION NOTES
43These declarations were extracted from the
44interface documentation at line 7776.
45.Bd -literal
46SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
47.Ed
48.Sh SEE ALSO
49.Xr sqlite3_blob 3 ,
50.Xr sqlite3_blob_bytes 3 ,
51.Xr sqlite3_blob_open 3 ,
52.Xr sqlite3_blob_read 3 ,
53.Xr sqlite3_blob_write 3
54