go-sql-driver / go-sql-driver/mysql
Implement cursor support
Open
database/sql issue
enhancement
help wanted
- Dominant language
- Go
- Stars
- 15.3k
- Forks
- 2.3k
- Avg merge
- 2h 23m
- Merged PRs (30d)
- 10
Description
### Issue description
In some cases it might be undesirable to fetch a potentially huge resultset at once.
MySQL provides cursors for that in the binary protocol (prepared statements).
First, a cursor flag has to be set in [`COM_STMT_EXECUTE`](https://dev.mysql.com/doc/internals/en/com-stmt-execute.html), then the result chunks can be requested with the [`COM_STMT_FETCH` command](https://dev.mysql.com/doc/internals/en/com-stmt-fetch.html).
Initially, we will probably only support forward-only and read-only cursors. However the question remains, trough what interface we make this feature available.
Contributor guide
Assessment
This issue has not been assessed yet.