Skip to content

Commit

Permalink
Update engine.R
Browse files Browse the repository at this point in the history
also return data ("scalar numeric that specifies the number of rows affected") in case of an is_sql_update_query, and not just SELECT-like queries
  • Loading branch information
edalfon authored Sep 24, 2021
1 parent 6c402de commit f78e1c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/engine.R
Original file line number Diff line number Diff line change
Expand Up @@ -555,8 +555,8 @@ eng_sql = function(options) {

data = tryCatch({
if (is_sql_update_query(query)) {
DBI::dbExecute(conn, query)
NULL
data = DBI::dbExecute(conn, query)
data
} else if (is.null(varname) && max.print > 0) {
# execute query -- when we are printing with an enforced max.print we
# use dbFetch so as to only pull down the required number of records
Expand Down

0 comments on commit f78e1c6

Please sign in to comment.