xref: /netbsd-src/external/public-domain/sqlite/man/sqlite3_blob_close.3 (revision a24efa7dea9f1f56c3bdb15a927d3516792ace1c)
1.Dd $Mdocdate$
2.Dt SQLITE3_BLOB_CLOSE 3
3.Os
4.Sh NAME
5.Nm sqlite3_blob_close
6.Nd Close A BLOB Handle
7.Sh SYNOPSIS
8.Ft int
9.Fo sqlite3_blob_close
10.Fa "sqlite3_blob *"
11.Fc
12.Sh DESCRIPTION
13Closes an open BLOB handle.
14.Pp
15Closing a BLOB shall cause the current transaction to commit if there
16are no other BLOBs, no pending prepared statements, and the database
17connection is in autocommit mode.
18If any writes were made to the BLOB, they might be held in cache until
19the close operation if they will fit.
20.Pp
21Closing the BLOB often forces the changes out to disk and so if any
22I/O errors occur, they will likely occur at the time when the BLOB
23is closed.
24Any errors that occur during closing are reported as a non-zero return
25value.
26.Pp
27The BLOB is closed unconditionally.
28Even if this routine returns an error code, the BLOB is still closed.
29.Pp
30Calling this routine with a null pointer (such as would be returned
31by a failed call to sqlite3_blob_open()) is a harmless
32no-op.
33.Sh SEE ALSO
34.Xr sqlite3_get_autocommit 3 ,
35.Xr sqlite3_blob 3 ,
36.Xr sqlite3_blob_open 3
37