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

Prcandidate/out of order blob #381

Merged
merged 8 commits into from Oct 16, 2020

Conversation

detule
Copy link
Collaborator

@detule detule commented Jul 30, 2020

Hi @jimhester

This is one approach to tackling the infamous "invalid descriptor" problem. The idea is: If driver is such that out-of-order-retrieval via SQLGetData is not possible then unbind all nanodbc buffers past the first unbound (blob) column.

First two patches are a clean-ish backport of the upstream patches that introduce the 'result::unbind' endpoint - but more importantly, route calls to get<T> to SQLGetData if there is no bound buffer. Previously this (no buffer bound to the column) was the case only for blobs, but now it's possible for non-blobby columns if the user asked these to be unbound.

Second two are package:odbc patches that implement the "unbind-if-necessary" logic. connection::get_data_any_order is particularly ugly - happy to make updates there and elsewhere.

Thanks

detule and others added 5 commits July 29, 2020 23:49
col.ctype_ is never mapped to SQL_C_GUID

Upstream: 05cccbe0b287635647daf3182a3e9b212486a54c
 step

To facilitate subsequent data-retrival, route calls to SQLGetData if no
buffer is bound to the column.

Upstream: b674adc23eb90b142a8045b5ad11440858b31bce
@jimhester
Copy link
Contributor

jimhester commented Oct 16, 2020

Hi Oliver, thanks so much for working on this!

Both the upstream patch to nanoodbc and this PR, I apologize for the delay in getting to the review but I think the code looks good as is.

As this is a significant contribution I would like to add you as a formal contributor to the package, would you prefer I use your full name or just the detule alias?

@detule
Copy link
Collaborator Author

detule commented Oct 16, 2020

@jimhester thanks again. Appreciate being added as a contributor - full name is fine.

@jimhester jimhester merged commit 48eac1a into r-dbi:master Oct 16, 2020
@jimhester
Copy link
Contributor

Hey! Thanks!

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 this pull request may close these issues.

None yet

2 participants