SQLExtendedFetch Implementation - #61
Conversation
|
Similar as #60 (comment), will switch the target branch to |
Note that commits prior to this one are for SQLBindCol
* `SQLExtendedFetch` doesn't return `SQL_SUCCESS_WITH_INFO` for error state 22002.
7083425 to
134a7ea
Compare
134a7ea to
3a9a4f4
Compare
| SQLUSMALLINT* rowStatusArray) { | ||
| if (m_hasReachedEndOfResult) { | ||
| m_ird->SetRowsProcessed(0); | ||
| return false; |
There was a problem hiding this comment.
Do you have to update rowCountPtr/rowStatusArray here?
There was a problem hiding this comment.
Yea this is the simplest way I found. I don't know if the original flightsql-odbc code handles rowCountPtr/rowStatusArray from SQLExtendedFetch. The logic in the driver for setting SQL_ATTR_ROWS_FETCHED_PTR and SQL_ATTR_ROW_STATUS_PTR cannot be reused for rowCountPtr and rowStatusArray respectively, since the spec says the rowCountPtr/rowStatusArray buffers are only used by SQLExtendedFetch and not by SQLFetch or SQLFetchScroll.
There was a problem hiding this comment.
The old driver cheated a bit. It temporarily wrote the SQL_ATTR_ROWS_FETCHED_PTR and SQL_ATTR_ROW_STATUS_PTR with the inputs from SQLExtendedFetch then reverted them after the call finished.
alinaliBQ
left a comment
There was a problem hiding this comment.
Addressing comments from James
| SQLUSMALLINT* rowStatusArray) { | ||
| if (m_hasReachedEndOfResult) { | ||
| m_ird->SetRowsProcessed(0); | ||
| return false; |
There was a problem hiding this comment.
Yea this is the simplest way I found. I don't know if the original flightsql-odbc code handles rowCountPtr/rowStatusArray from SQLExtendedFetch. The logic in the driver for setting SQL_ATTR_ROWS_FETCHED_PTR and SQL_ATTR_ROW_STATUS_PTR cannot be reused for rowCountPtr and rowStatusArray respectively, since the spec says the rowCountPtr/rowStatusArray buffers are only used by SQLExtendedFetch and not by SQLFetch or SQLFetchScroll.
No description provided.