Implement NextResultSet in a way compatible with sql.Rows.NextResultSet()
- Dominant language
- Go
- Stars
- 14.3k
- Forks
- 1.1k
- Avg merge
- 6d 9h
- Merged PRs (30d)
- 11
Description
**Is your feature request related to a problem? Please describe.**
When trying to use pgx in a multi database module, like scany or similar, and trying to be compatible with database/sql it fails because NextResultSet like in sql.Rows is not implemented.
Also see https://github.com/jackc/pgx/issues/308 and https://github.com/jackc/pgx/issues/1512
Yes I know you "shouldn't" use NextResultSet and I really don't like it but I proprietary system I have to live with returns multiple result sets and that isn't something I can change.
**Describe the solution you'd like**
Even if it's slow and not optimal, perhaps it's possible to emulate it using MultiResultReader or something.
I'd gladly help but I do not have detailed enough knowledge about pgx to figure out if it's even possible.
**Describe alternatives you've considered**
Just implement the function and always return false for now.
**Additional context**
Contributor guide
Research direction
Start by comparing pgx's existing result-reading behavior with database/sql.Rows.NextResultSet(), then review the related issues #308 and #1512. Determine whether MultiResultReader can support compatible traversal of multiple result sets; done means callers can use the database/sql-compatible operation with the described proprietary system.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, postgresql
- Domain
- database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100