int sqlite3_column_bytes( sqlite3_stmt* stmt, int cidx ); int sqlite3_column_bytes16( sqlite3_stmt* stmt, int cidx );
stmt
A prepared and executed statement.
cidx
A column index. The first column has an index
of zero (0).
The number of bytes in the column value.
These functions return the number of bytes in a text or BLOB
value. Calling these functions can cause a type conversion
(invalidating buffers returned by sqlite3_column_xxx()), so care must be taken to
call them in conjunction with the appropriate sqlite3_column_xxx()
function.
To avoid problems, an application should first extract the
desired type using a sqlite3_column_xxx() function, and then call
the appropriate sqlite3_column_bytes() function. The functions
sqlite3_column_text()
and sqlite3_column_blob()
should be followed by a call to sqlite3_column_bytes(), while any call to
sqlite3_column_text16()
should be followed by a call to sqlite3_column_bytes16().
If these functions are called on a non-text or non-BLOB value, the value will first be converted to an appropriately encoded text value, then the length of that text value will be returned.