const char *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);
R-06827-27714:[These routines provide a means to determine the database, table, and table column that is the origin of a particular result column in SELECT statement. ] R-02781-38257:[The name of the database or table or column can be returned as either a UTF-8 or UTF-16 string. ] R-27819-43026:[The _database_ routines return the database name, the _table_ routines return the table name, and the origin_ routines return the column name. ] R-41183-50724:[The returned string is valid until the prepared statement is destroyed using sqlite3_finalize() or until the statement is automatically reprepared by the first call to sqlite3_step() for a particular run or until the same information is requested again in a different encoding. ]
R-34933-01612:[The names returned are the original un-aliased names of the database, table, and column. ]
R-45001-15102:[The first argument to these interfaces is a prepared statement. ] R-01766-56079:[These functions return information about the Nth result column returned by the statement, where N is the second function argument. ] R-33977-57271:[The left-most column is column 0 for these routines. ]
R-53264-40062:[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. ] R-25394-06637:[These routine might also return NULL if a memory allocation error occurs. ] R-28818-00847:[Otherwise, they return the name of the attached database, table, or column that query result column was extracted from. ]
R-38470-19236:[As with all other SQLite APIs, those whose names end with "16" return UTF-16 encoded strings and the other functions return UTF-8. ]
R-63158-42531:[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.