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