The sqlite3_value structure
holds a database value. The structure contains the value as well
as the type information. A value might hold an integer or
floating-point number, a BLOB, a text value in one of many
different UTF encodings, or a NULL. Values are used as the
parameters to SQL function implementations. They can also be
extracted from statement results.
Value structures come in two types:
protected and
unprotected. Protected values can
safely undergo standalone type conversion, while unprotected
values cannot. SQL function parameters are protected, and can be passed to
any form of sqlite3_value_xxx(). Values extracted from
sqlite3_column_value()
are not unprotected. They can safely be passed to sqlite3_bind_value() or sqlite3_result_value(), but they cannot be passed to
sqlite3_value_xxx(). To extract a native C datatype from a
statement, use one of the other sqlite3_column_xxx() functions.
The sqlite3_value structure
is opaque, and an application should never access any of the
data fields directly.