summaryrefslogtreecommitdiff
path: root/static/netbsd/man3/sqlite3_column_database_name.3
diff options
context:
space:
mode:
Diffstat (limited to 'static/netbsd/man3/sqlite3_column_database_name.3')
-rw-r--r--static/netbsd/man3/sqlite3_column_database_name.3100
1 files changed, 100 insertions, 0 deletions
diff --git a/static/netbsd/man3/sqlite3_column_database_name.3 b/static/netbsd/man3/sqlite3_column_database_name.3
new file mode 100644
index 00000000..56c54e6d
--- /dev/null
+++ b/static/netbsd/man3/sqlite3_column_database_name.3
@@ -0,0 +1,100 @@
+.Dd January 24, 2024
+.Dt SQLITE3_COLUMN_DATABASE_NAME 3
+.Os
+.Sh NAME
+.Nm sqlite3_column_database_name ,
+.Nm sqlite3_column_database_name16 ,
+.Nm sqlite3_column_table_name ,
+.Nm sqlite3_column_table_name16 ,
+.Nm sqlite3_column_origin_name ,
+.Nm sqlite3_column_origin_name16
+.Nd source of data in a query result
+.Sh SYNOPSIS
+.In sqlite3.h
+.Ft const char *
+.Fo sqlite3_column_database_name
+.Fa "sqlite3_stmt*"
+.Fa "int"
+.Fc
+.Ft const void *
+.Fo sqlite3_column_database_name16
+.Fa "sqlite3_stmt*"
+.Fa "int"
+.Fc
+.Ft const char *
+.Fo sqlite3_column_table_name
+.Fa "sqlite3_stmt*"
+.Fa "int"
+.Fc
+.Ft const void *
+.Fo sqlite3_column_table_name16
+.Fa "sqlite3_stmt*"
+.Fa "int"
+.Fc
+.Ft const char *
+.Fo sqlite3_column_origin_name
+.Fa "sqlite3_stmt*"
+.Fa "int"
+.Fc
+.Ft const void *
+.Fo sqlite3_column_origin_name16
+.Fa "sqlite3_stmt*"
+.Fa "int"
+.Fc
+.Sh DESCRIPTION
+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.
+The name of the database or table or column can be returned as either
+a UTF-8 or UTF-16 string.
+The _database_ routines return the database name, the _table_ routines
+return the table name, and the origin_ routines return the column name.
+The returned string is valid until the prepared statement
+is destroyed using
+.Fn sqlite3_finalize
+or until the statement is automatically reprepared by the first call
+to
+.Fn sqlite3_step
+for a particular run or until the same information is requested again
+in a different encoding.
+.Pp
+The names returned are the original un-aliased names of the database,
+table, and column.
+.Pp
+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.
+.Pp
+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 routines 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.
+.Pp
+As with all other SQLite APIs, those whose names end with "16" return
+UTF-16 encoded strings and the other functions return UTF-8.
+.Pp
+These APIs are only available if the library was compiled with the
+SQLITE_ENABLE_COLUMN_METADATA C-preprocessor
+symbol.
+.Pp
+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.
+.Sh IMPLEMENTATION NOTES
+These declarations were extracted from the
+interface documentation at line 4822.
+.Bd -literal
+SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt*,int);
+SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt*,int);
+SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt*,int);
+SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt*,int);
+SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt*,int);
+SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt*,int);
+.Ed
+.Sh SEE ALSO
+.Xr sqlite3_finalize 3 ,
+.Xr sqlite3_step 3 ,
+.Xr sqlite3_stmt 3