-
Notifications
You must be signed in to change notification settings - Fork 107
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
Feature/query timeout option #517
base: main
Are you sure you want to change the base?
Conversation
Hi - thanks for the submission. It would be challenging to review this PR because of the way the diff comes through. You may be using text editing software (windows?) that alters the line endings. Please resubmit with a clean diff. Also, commenting out the ASSERT is likely not the right approach. I would leave that line unaltered in your next submission; we can address elsewhere. |
…ue to invalid static_cast in nanodbc.cpp)
There is one issue while using the query_timeout and params. I will check and fix this! Update: Issue has been detected, I will commit the fix tomorrow. |
A new fix has been pushed which resolves the issue of a query using params and query_timeout. Additional tests have been added as well. Pull request is ready for review. |
@detule Did you have an opportunity to review and approve the pull request? |
It looks good to me overall. Thanks for your contributions.
Thanks. |
Hi: Thanks for the submission and for adding tests - appreciate it. Mostly small comments:
|
@detule and @shrektan Thanks for reviewing! I will update the pull request later on this week. It seems there is always some confusion between a connection timeout and an actual query timeout. To avoid this, I've choosen for the query_timeout parameter name. Is it still required to rename query_timeout to timeout (shorter names aren't always better in my opinion...)
Why should it be moved out of the README? I think it should be available as well in the README section on the GitHub home page of the project. Users will immediatly have an example. |
Hi:
Thanks again for the submission. |
#Conflicts: # tests/testthat/test-SQLServer.R
* Rename to timeout * Default to info * Document
@Odraio can you reproduce build failures locally? It works for my when I test with my local sql server, so I'm a bit mystified as to what is going wrong. |
Issue
Current odbc main repo does not provide a query_timeout option.
Closes #515
Feature description
dbGetQuery()
,dbSendStatement()
anddbSendQuery()
provide aquery_timeout
option (internally setsSQL_ATTR_QUERY_TIMEOUT
).query_timeout
: The number in seconds before query timeout (can be used to stop long running queries).Default is 0 indicating no timeout.
Example:
Additional request: