Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support returning column names of prepared statement #764

Closed
PThorpe92 opened this issue Jan 22, 2025 · 0 comments · Fixed by #766
Closed

Support returning column names of prepared statement #764

PThorpe92 opened this issue Jan 22, 2025 · 0 comments · Fixed by #766

Comments

@PThorpe92
Copy link
Contributor

PThorpe92 commented Jan 22, 2025

I'm in the process of writing the Go database/sql driver, and this requires that the names of the columns are able to be queried from a prepared statement.

database/sql/driver

type StmtQueryContext interface {
	// ...
	QueryContext(ctx context.Context, args []NamedValue) (Rows, error)
}

We need to be able to call stmt.columns() to return an array of strings of the column names of the query.

type Rows interface {
	// Columns returns the names of the columns.
	Columns() []string
     // ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant