Debian Codegraph @

sqlite3_opt_column_metadata.go

raw
1 //go:build sqlite_column_metadata
2
3 package sqlite3
4
5 /*
6 #ifndef USE_LIBSQLITE3
7 #cgo CFLAGS: -DSQLITE_ENABLE_COLUMN_METADATA
8 #include "sqlite3-binding.h"
9 #else
10 #include <sqlite3.h>
11 #endif
12 */
13 import "C"
14
15 // ColumnTableName returns the table that is the origin of a particular result
16 // column in a SELECT statement.
17 //
18 // See https://www.sqlite.org/c3ref/column_database_name.html
19 func (s *SQLiteStmt) ColumnTableName(n int) string {
20 return C.GoString(C.sqlite3_column_table_name(s.s, C.int(n)))
21 }