SQLITE3_COLUMN_DATABASE_NAME(3) | Library Functions Manual | SQLITE3_COLUMN_DATABASE_NAME(3) |
sqlite3_column_database_name
,
sqlite3_column_database_name16
,
sqlite3_column_table_name
,
sqlite3_column_table_name16
,
sqlite3_column_origin_name
,
sqlite3_column_origin_name16
—
sqlite3_column_database_name
(sqlite3_stmt*,
int);
const void *
sqlite3_column_database_name16
(sqlite3_stmt*,
int);
const char *
sqlite3_column_table_name
(sqlite3_stmt*,
int);
const void *
sqlite3_column_table_name16
(sqlite3_stmt*,
int);
const char *
sqlite3_column_origin_name
(sqlite3_stmt*,
int);
const void *
sqlite3_column_origin_name16
(sqlite3_stmt*,
int);
The names returned are the original un-aliased names of the database, table, and column.
The first argument to these interfaces is a prepared statement. These functions return information about the Nth result column returned by the statement, where N is the second function argument. The left-most column is column 0 for these routines.
If the Nth column returned by the statement is an expression or subquery and is not a column value, then all of these functions return NULL. These routine might also return NULL if a memory allocation error occurs. Otherwise, they return the name of the attached database, table, or column that query result column was extracted from.
As with all other SQLite APIs, those whose names end with "16" return UTF-16 encoded strings and the other functions return UTF-8.
These APIs are only available if the library was compiled with the SQLITE_ENABLE_COLUMN_METADATA C-preprocessor symbol.
If two or more threads call one or more of these routines against the same prepared statement and column at the same time then the results are undefined.
If two or more threads call one or more column metadata interfaces for the same prepared statement and result column at the same time then the results are undefined.
December 19, 2018 | NetBSD 9.0 |