Skip to content

Commit

Permalink
Remove = NULL from function header
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Cook committed Sep 7, 2019
1 parent 34e6718 commit 6059cff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions R/query.R
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,16 @@ NULL
#' @importFrom queryparser parse_query
#' @importFrom utils head
#' @export
query <- function(data = NULL, sql = NULL) {

if (is.null(data) && is.null(sql)) {
query <- function(data, sql) {
if (missing("data") && missing("sql")) {
stop("0 arguments passed to query() which requires 1 or 2 arguments")
}
if (missing("sql")) {
sql <- NULL
}
if (missing("data")) {
data <- NULL
}
if (!is.data.frame(data) && !inherits(data, "tbl") && is.character(data)) {
if (is.data.frame(sql) || inherits(sql, "tbl")) {
stop("When calling query() with two arguments, specify the data first and the SQL statement second")
Expand Down
2 changes: 1 addition & 1 deletion man/query.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6059cff

Please sign in to comment.