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

Spurious warnings #40

Open
ggrothendieck opened this issue Apr 10, 2020 · 1 comment
Open

Spurious warnings #40

ggrothendieck opened this issue Apr 10, 2020 · 1 comment

Comments

@ggrothendieck
Copy link
Owner

ggrothendieck commented Apr 10, 2020

Recent versions of RSQLite cause spurious warnings when statements other than select are used in the SQL statement. (e.g. update, delete, insert, etc.)

@ggrothendieck
Copy link
Owner Author

Can use this to muffle the offending warnings without affecting other warnings.

sqldf2 <- function(...) {
  withCallingHandlers(sqldf(...), warning = 
    function(w) if (grepl("SQL statements must be issued with dbExecute", w)) 
      invokeRestart("muffleWarning") else w)
}

sqldf2(...sql statement...)

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

No branches or pull requests

1 participant