MCPcopy
hub / github.com/sqlc-dev/sqlc / GetColumnNames

Method GetColumnNames

internal/x/expander/expander_test.go:61–68  ·  view source on GitHub ↗
(ctx context.Context, query string)

Source from the content-addressed store, hash-verified

59}
60
61func (g *MySQLColumnGetter) GetColumnNames(ctx context.Context, query string) ([]string, error) {
62 rows, err := g.db.QueryContext(ctx, query)
63 if err != nil {
64 return nil, err
65 }
66 defer rows.Close()
67 return rows.Columns()
68}
69
70// SQLiteColumnGetter implements ColumnGetter for SQLite using the native ncruces/go-sqlite3 API.
71type SQLiteColumnGetter struct {

Callers

nothing calls this directly

Calls 3

ColumnsMethod · 0.80
QueryContextMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected