Index: src/sqlite.h.in ================================================================== --- src/sqlite.h.in +++ src/sqlite.h.in @@ -6136,29 +6136,41 @@ ** interface fixed, support it indefinitely, and remove this comment. */ /* ** CAPI3REF: A Handle To An Open BLOB -** KEYWORDS: {BLOB handle} {BLOB handles} +** KEYWORDS: {BLOB handle} {BLOB handles} {sqlite3_blob object} ** -** An instance of this object represents an open BLOB on which -** [sqlite3_blob_open | incremental BLOB I/O] can be performed. +** An instance of this object represents a connection to a single +** column in a single row of a table that holds either a BLOB or string +** and on which [sqlite3_blob_open | incremental BLOB I/O] can be performed. +** ** ^Objects of this type are created by [sqlite3_blob_open()] ** and destroyed by [sqlite3_blob_close()]. ** ^The [sqlite3_blob_read()] and [sqlite3_blob_write()] interfaces ** can be used to read or write small subsections of the BLOB. ** ^The [sqlite3_blob_bytes()] interface returns the size of the BLOB in bytes. +** +** An sqlite3_blob object can be in two states: ACTIVE and RESET. When in +** the ACTIVE state, the object is pointing to a specific entry and is +** ready to do I/O. When RESET, the sqlite3_blob object is in standby mode, +** is not associated with any particular row of its table, +** and is not available for I/O. +** +** The sqlite3_blob object does not contain a mutex and so a single +** sqlite3_blob object may not be safely used by multiple threads +** concurrently. */ typedef struct sqlite3_blob sqlite3_blob; /* ** CAPI3REF: Open A BLOB For Incremental I/O ** METHOD: sqlite3 ** CONSTRUCTOR: sqlite3_blob ** -** ^(This interfaces opens a [BLOB handle | handle] to the BLOB located -** in row iRow, column zColumn, table zTable in database zDb; +** ^(This interfaces creates an sqlite3_blob object pointing to the string +** or BLOB located in row iRow, column zColumn, table zTable in database zDb; ** in other words, the same BLOB that would be selected by: ** **
 **     SELECT zColumn FROM zDb.zTable WHERE [rowid] = iRow;
 ** 
)^ @@ -6171,14 +6183,15 @@ ** ** ^If the flags parameter is non-zero, then the BLOB is opened for read ** and write access. ^If the flags parameter is zero, the BLOB is opened for ** read-only access. ** -** ^(On success, [SQLITE_OK] is returned and the new [BLOB handle] is stored -** in *ppBlob. Otherwise an [error code] is returned and, unless the error -** code is SQLITE_MISUSE, *ppBlob is set to NULL.)^ ^This means that, provided -** the API is not misused, it is always safe to call [sqlite3_blob_close()] +** ^(On success, [SQLITE_OK] is returned and the new [sqlite3_blob object] +** is stored in *ppBlob. Otherwise an [error code] is returned and +** *ppBlob is set to NULL.)^ ^Because *ppBlob is always set to either a +** valid sqlite3_blob object or NULL +** it is always safe to call [sqlite3_blob_close()] ** on *ppBlob after this function it returns. ** ** This function fails with SQLITE_ERROR if any of the following are true: **