~hrbrmstr/sergeant

f211f6b214dd7b5f36d99dd062ade62b65729d66 — hrbrmstr 3 years ago 09a853d master
Fixed #44
5 files changed, 18 insertions(+), 3 deletions(-)

M DESCRIPTION
M NAMESPACE
M NEWS.md
M R/dbi.r
M R/query.r
M DESCRIPTION => DESCRIPTION +2 -2
@@ 1,6 1,6 @@
Package: sergeant
Title: Tools to Transform and Query Data with Apache Drill
Version: 0.9.0
Version: 0.9.1
Authors@R: c(
      person("Bob", "Rudis", email = "bob@rud.is", role = c("aut", "cre"), 
             comment = c(ORCID = "0000-0001-5670-2640")),


@@ 45,5 45,5 @@ Suggests:
    tinytest,
    covr (>= 3.0.0),
    DBItest
RoxygenNote: 7.1.0
RoxygenNote: 7.1.1
Roxygen: list(markdown = TRUE)

M NAMESPACE => NAMESPACE +1 -0
@@ 57,6 57,7 @@ exportMethods(dbGetStatement)
exportMethods(dbHasCompleted)
exportMethods(dbIsValid)
exportMethods(dbListFields)
exportMethods(dbQuoteIdentifier)
exportMethods(dbSendQuery)
exportMethods(dbUnloadDriver)
import(DBI)

M NEWS.md => NEWS.md +5 -0
@@ 1,3 1,8 @@
# sergeant 0.9.1

- Fixed identifier quoting issue #44 by @alistaire47
- Fixed `RETRY` bug in `drill_query` (directg REST API)

# sergeant 0.9.0

- Column order preserved in REST API & REST API DBI-based calls if

M R/dbi.r => R/dbi.r +8 -0
@@ 410,9 410,17 @@ setMethod(
  }
)

quote_identifier <- function(conn, x, ...) {
  ifelse(grepl("`", x), dbplyr::sql_quote(x, ' '), dbplyr::sql_quote(x, '`'))
}

#' @export
setMethod("dbQuoteIdentifier", signature("DrillConnection", "character"), quote_identifier)

#' @rdname DrillConnection-class
#' @family Drill REST DBI API
#' @export
#'
setMethod(
  'dbListFields',
  c('DrillConnection', 'character'),

M R/query.r => R/query.r +2 -1
@@ 41,7 41,7 @@ drill_query <- function(drill_con, query, uplift=TRUE, .progress=interactive()) 

    if (.progress) {
      httr::RETRY(
        "POST",
        verb = "POST",
        url = sprintf("%s/query.json", drill_server),
        encode = "json",
        httr::progress(),


@@ 53,6 53,7 @@ drill_query <- function(drill_con, query, uplift=TRUE, .progress=interactive()) 
      ) -> res
    } else {
      httr::RETRY(
        verb = "POST",
        url = sprintf("%s/query.json", drill_server),
        encode = "json",
        body = list(