| 73 | } |
| 74 | |
| 75 | func (g *SQLiteColumnGetter) GetColumnNames(ctx context.Context, query string) ([]string, error) { |
| 76 | // Prepare the statement - this gives us column metadata without executing |
| 77 | stmt, _, err := g.conn.Prepare(query) |
| 78 | if err != nil { |
| 79 | return nil, err |
| 80 | } |
| 81 | defer stmt.Close() |
| 82 | |
| 83 | // Get column names from the prepared statement |
| 84 | count := stmt.ColumnCount() |
| 85 | columns := make([]string, count) |
| 86 | for i := 0; i < count; i++ { |
| 87 | columns[i] = stmt.ColumnName(i) |
| 88 | } |
| 89 | |
| 90 | return columns, nil |
| 91 | } |
| 92 | |
| 93 | func TestExpandPostgreSQL(t *testing.T) { |
| 94 | ctx := context.Background() |