-
-
Notifications
You must be signed in to change notification settings - Fork 873
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
added options immedate & replace to eng_SQL #2128
Open
AWKruijt
wants to merge
5
commits into
yihui:master
Choose a base branch
from
AWKruijt:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Commits on May 17, 2022
-
Configuration menu - View commit details
-
Copy full SHA for c8668af - Browse repository at this point
Copy the full SHA c8668afView commit details
Commits on May 18, 2022
-
Improved handling of options$immediate and additional options$replace - these edits work in a knitr::knit_engines$set( ) style test. Immediate = T passes param immediate = T to dbExecute() / dbGetQuery(). Immedate is not implemented for query's with options$max.print set. I can't be sure if options$immediate also works icw options$params - I can't get params to run at all on my server. Passing values from local environment using ?value works however, also icw the immediate option. Replace = T adds code to drop an existing temporary table before running the into # statement. I thought this might be handy but leave it to others to decide on whether this is truly needed (I also don't really know if this implementation works on other servers than the one I use). I've also included an error message to catch attempted replacement of non-temporary tables but error handling doesn't work yet as expected - when attempting to replace a table with a name not starting with #, the generic server error message appears: ([SQL Server]CREATE TABLE permission denied in database 'DWH'. ) - perhaps someone else will now how to fix, though perhaps we'll not want to implement the replace option at all. Example code: ```{r qvalue} StadiumCode <- '0A' ``` ```{sql, immediate = T, replace = T} SELECT * into #tum FROM statistiek.vw_dimStadium where StadiumCode = ?StadiumCode ``` ```{sql fetch} SELECT * FROM #tum ```
Anne-Wil committedMay 18, 2022 Configuration menu - View commit details
-
Copy full SHA for c0e6a63 - Browse repository at this point
Copy the full SHA c0e6a63View commit details -
Fixed error handling on temporary table check. What a difference a space makes...
Anne-Wil committedMay 18, 2022 Configuration menu - View commit details
-
Copy full SHA for 19366f8 - Browse repository at this point
Copy the full SHA 19366f8View commit details
Commits on Jun 14, 2022
-
- added prefixes sql. to immediate and replace options - set NULL as default for sql.immediate - handling of user input FALSE as well as TRUE for sql.immediate - added stop when attempting to replace (sql.replace == T) when not executing immediately (sql.immedate == F) - removed all-whitespaced lines as well as I could To be discussed: implement non-passing of parameter immediate when options$sql.immediate is not set.
Anne-Wil committedJun 14, 2022 Configuration menu - View commit details
-
Copy full SHA for 358d552 - Browse repository at this point
Copy the full SHA 358d552View commit details
Commits on Jun 24, 2022
-
Fix regex for lifting temporary table name to replace when sql.replace =T + a correction to the getQuery call with params where `sql` was used instead of `query`.
Anne-Wil committedJun 24, 2022 Configuration menu - View commit details
-
Copy full SHA for a47b771 - Browse repository at this point
Copy the full SHA a47b771View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.