Name
sqlite3_column_origin_name() — Get the source column name of a result column
Definition
const char* sqlite3_column_origin_name( sqlite3_stmt* stmt, int cidx ); const void* sqlite3_column_origin_name16( sqlite3_stmt* stmt, int cidx );
-
stmt
A prepared statement.
-
cidx
A column index. The first column has an index of zero (
0
).- Returns
The name of the source column for the given result column.
Description
These functions return the name of the source column that is
associated with a SELECT
result column. Returned pointers will remain valid until
sqlite3_finalize()
is
called on the statement, or until one of these functions is
called with the same column index. SQLite will take care of all
memory management for the buffers returned by these
functions.
Data is only available for result columns that are derived directly from a column reference. If a result column is defined as an expression or subquery, a NULL will be returned.
These functions are only available if the SQLite library was
compiled with the SQLITE_ENABLE_COLUMN_METADATA
build
option.
See Also
sqlite3_column_name() [C API, Ap G], sqlite3_column_table_name() [C API, Ap G], sqlite3_column_database_name() [C API, Ap G], SQLITE_ENABLE_COLUMN_METADATA [Build Opt, Ap A]
Get Using SQLite now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.