Sq3BlobC - various functions to perform misc operations … More...
Functions | |
static MK_I32 | Sq3BlobBytes (SQ3_BLOB sq3blob) |
Return The Size Of An Open BLOB … | |
static enum MkErrorE | Sq3BlobReadHide (SQ3_BLOB sq3blob, MK_PTR Z, MK_I32 N, MK_I32 iOffset) |
Read Data From A BLOB Incrementally … | |
static enum MkErrorE | Sq3BlobReopen (SQ3_BLOB sq3blob, MK_I64 arg1) |
Move a BLOB Handle to a New Row … | |
static enum MkErrorE | Sq3BlobWriteHide (SQ3_BLOB sq3blob, MK_PTRN z, MK_I32 n, MK_I32 iOffset) |
Write Data Into A BLOB Incrementally … | |
static enum MkErrorE | Sq3BlobRead_RT (MK_RT mkrt, SQ3_BLOB sq3blob, MK_BUF *Z_inout, MK_I32 iOffset) |
Read Data From A BLOB Incrementally … | |
static enum MkErrorE | Sq3BlobWrite_RT (MK_RT mkrt, SQ3_BLOB sq3blob, MK_BUF z, MK_I32 iOffset) |
Write Data Into A BLOB Incrementally … | |
Sq3BlobC - Sq3BlobC_Misc_C_API - function | |
enum MkErrorE | Sq3BlobReadP (MK_RT mkrt, SQ3_BLOB sq3blob, MK_BUF *Z_inout, MK_I32 iOffset) |
Non-inline replacement for Sq3BlobRead … | |
MK_I32 | Sq3BlobBytesP (SQ3_BLOB sq3blob) |
Non-inline replacement for Sq3BlobBytes … | |
enum MkErrorE | Sq3BlobReadHideP (SQ3_BLOB sq3blob, MK_PTR Z, MK_I32 N, MK_I32 iOffset) |
Non-inline replacement for Sq3BlobReadHide … | |
enum MkErrorE | Sq3BlobReopenP (SQ3_BLOB sq3blob, MK_I64 arg1) |
Non-inline replacement for Sq3BlobReopen … | |
enum MkErrorE | Sq3BlobWriteP (MK_RT mkrt, SQ3_BLOB sq3blob, MK_BUF z, MK_I32 iOffset) |
Non-inline replacement for Sq3BlobWrite … | |
enum MkErrorE | Sq3BlobWriteHideP (SQ3_BLOB sq3blob, MK_PTRN z, MK_I32 n, MK_I32 iOffset) |
Non-inline replacement for Sq3BlobWriteHide … | |
Sq3BlobC - Sq3BlobC_Misc_C_API - overload | |
#define | Sq3BlobRead_NULL(...) |
#define | Sq3BlobRead(...) |
#define | Sq3BlobRead_E(...) |
#define | Sq3BlobRead_C(...) |
#define | Sq3BlobReadHide_E(...) |
#define | Sq3BlobReadHide_C(...) |
#define | Sq3BlobReopen_E(...) |
#define | Sq3BlobReopen_C(...) |
#define | Sq3BlobWrite_NULL(...) |
#define | Sq3BlobWrite(...) |
#define | Sq3BlobWrite_E(...) |
#define | Sq3BlobWrite_C(...) |
#define | Sq3BlobWriteHide_E(...) |
#define | Sq3BlobWriteHide_C(...) |
Sq3BlobC - various functions to perform misc operations …
#define Sq3BlobRead | ( | ... | ) |
Definition at line 50 of file sqlite3_overload_sq3.h.
#define Sq3BlobRead_C | ( | ... | ) |
Definition at line 52 of file sqlite3_overload_sq3.h.
#define Sq3BlobRead_E | ( | ... | ) |
Definition at line 51 of file sqlite3_overload_sq3.h.
#define Sq3BlobRead_NULL | ( | ... | ) |
Definition at line 49 of file sqlite3_overload_sq3.h.
#define Sq3BlobReadHide_C | ( | ... | ) |
Definition at line 56 of file sqlite3_overload_sq3.h.
#define Sq3BlobReadHide_E | ( | ... | ) |
Definition at line 55 of file sqlite3_overload_sq3.h.
#define Sq3BlobReopen_C | ( | ... | ) |
Definition at line 58 of file sqlite3_overload_sq3.h.
#define Sq3BlobReopen_E | ( | ... | ) |
Definition at line 57 of file sqlite3_overload_sq3.h.
#define Sq3BlobWrite | ( | ... | ) |
Definition at line 60 of file sqlite3_overload_sq3.h.
#define Sq3BlobWrite_C | ( | ... | ) |
Definition at line 62 of file sqlite3_overload_sq3.h.
#define Sq3BlobWrite_E | ( | ... | ) |
Definition at line 61 of file sqlite3_overload_sq3.h.
#define Sq3BlobWrite_NULL | ( | ... | ) |
Definition at line 59 of file sqlite3_overload_sq3.h.
#define Sq3BlobWriteHide_C | ( | ... | ) |
Definition at line 64 of file sqlite3_overload_sq3.h.
#define Sq3BlobWriteHide_E | ( | ... | ) |
Definition at line 63 of file sqlite3_overload_sq3.h.
Return The Size Of An Open BLOB …
Returns the size in bytes of the BLOB accessible via the successfully opened BLOB handle in its only argument. The incremental blob I/O routines can only read or overwriting existing blob content; they cannot change the size of a blob.
This routine only works on a BLOB handle which has been created by a prior successful call to Sq3BlobOpen () and which has not been closed by Sq3BlobClose (). Passing any other pointer in to this routine results in undefined and probably undesirable behavior.
Reference code from sqlite3:
Definition at line 37 of file Sq3BlobC_sq3.h.
Non-inline replacement for Sq3BlobBytes …
|
inlinestatic |
Read Data From A BLOB Incrementally …
read more at 'Sq3BlobReadHide'
Definition at line 107 of file Sq3BlobC_sq3.h.
|
inlinestatic |
Read Data From A BLOB Incrementally …
This function is used to read data from an open BLOB handle into a caller-supplied buffer. N bytes of data are copied into buffer Z from the open BLOB, starting at offset iOffset.
If offset iOffset is less than N bytes from the end of the BLOB, SQ3_RESULT_ERROR is returned and no data is read. If N or iOffset is less than zero, SQ3_RESULT_ERROR is returned and no data is read. The size of the blob (and hence the maximum value of N+iOffset) can be determined using the Sq3BlobBytes () interface.
An attempt to read from an expired BLOB handle fails with an error code of SQ3_RESULT_ABORT.
On success, Sq3BlobRead() returns SQ3_RESULT_OK. Otherwise, an error code or an extended error code is returned.
This routine only works on a BLOB handle which has been created by a prior successful call to Sq3BlobOpen () and which has not been closed by Sq3BlobClose (). Passing any other pointer in to this routine results in undefined and probably undesirable behavior.
See also: Sq3BlobWrite ().
Reference code from sqlite3:
Definition at line 43 of file Sq3BlobC_sq3.h.
Non-inline replacement for Sq3BlobReadHide …
Non-inline replacement for Sq3BlobRead …
Move a BLOB Handle to a New Row …
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.
The new row must meet the same criteria as for Sq3BlobOpen () - 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 Sq3BlobRead (), Sq3BlobWrite () or Sq3BlobReopen () on an aborted blob handle immediately return SQ3_RESULT_ABORT. Calling Sq3BlobBytes () on an aborted blob handle always returns zero.
This function sets the database handle error code and message.
Reference code from sqlite3:
Definition at line 53 of file Sq3BlobC_sq3.h.
Non-inline replacement for Sq3BlobReopen …
|
inlinestatic |
Write Data Into A BLOB Incrementally …
read more at 'Sq3BlobWriteHide'
Definition at line 129 of file Sq3BlobC_sq3.h.
|
inlinestatic |
Write Data Into A BLOB Incrementally …
This function is used to write data into an open BLOB handle from a caller-supplied buffer. N bytes of data are copied from the buffer Z into the open BLOB, starting at offset iOffset.
On success, Sq3BlobWrite() returns SQ3_RESULT_OK. Otherwise, an error code or an extended error code is returned. Unless SQ3_RESULT_MISUSE is returned, this function sets the database connection error code and message accessible via Sq3LiteErrCode () and Sq3LiteErrMsg () and related functions.
If the BLOB handle passed as the first argument was not opened for writing (the flags parameter to Sq3BlobOpen () was zero), this function returns SQ3_RESULT_READONLY.
This function may only modify the contents of the BLOB; it is not possible to increase the size of a BLOB using this API. If offset iOffset is less than N bytes from the end of the BLOB, SQ3_RESULT_ERROR is returned and no data is written. The size of the BLOB (and hence the maximum value of N+iOffset) can be determined using the Sq3BlobBytes () interface. If N or iOffset are less than zero SQ3_RESULT_ERROR is returned and no data is written.
An attempt to write to an expired BLOB handle fails with an error code of SQ3_RESULT_ABORT. Writes to the BLOB that occurred before the BLOB handle expired are not rolled back by the expiration of the handle, though of course those changes might have been overwritten by the statement that expired the BLOB handle or by other independent statements.
This routine only works on a BLOB handle which has been created by a prior successful call to Sq3BlobOpen () and which has not been closed by Sq3BlobClose (). Passing any other pointer in to this routine results in undefined and probably undesirable behavior.
See also: Sq3BlobRead ().
Reference code from sqlite3:
Definition at line 63 of file Sq3BlobC_sq3.h.
Non-inline replacement for Sq3BlobWriteHide …