Exemplo n.º 1
0
// ColumnOriginName returns the original un-aliased table column name
// that is the origin of a particular result column in SELECT statement.
// The left-most column is column 0.
// (See http://www.sqlite.org/c3ref/column_database_name.html)
func (s *Stmt) ColumnOriginName(index int) string {
	if index < 0 || index >= s.ColumnCount() {
		panic(fmt.Sprintf("column index %d out of range [0,%d[.", index, s.ColumnCount()))
	}
	return C.GoString(C.sqlite3_column_origin_name(s.stmt, C.int(index)))
}
Exemplo n.º 2
0
Arquivo: meta.go Projeto: pkf/gosqlite
// ColumnOriginName returns the original un-aliased table column name
// that is the origin of a particular result column in SELECT statement.
// The left-most column is column 0.
// (See http://www.sqlite.org/c3ref/column_database_name.html)
func (s *Stmt) ColumnOriginName(index int) string {
	return C.GoString(C.sqlite3_column_origin_name(s.stmt, C.int(index)))
}