Name
sqlite3_column_database_name() — Get the source database name of a result column
Definition
const char* sqlite3_column_database_name( sqlite3_stmt* stmt, int cidx ); const void* sqlite3_column_database_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 logical name of the source database for the given result column.
Description
These functions return the unaliased logical name of the source
database 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_table_name(), sqlite3_column_origin_name(), SQLITE_ENABLE_COLUMN_METADATA [Build Opt, Ap A]
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access