Compare commits

...

1 Commits

Author SHA1 Message Date
boB Rudis f211f6b214
Fixed #44 3 years ago
  1. 4
      DESCRIPTION
  2. 1
      NAMESPACE
  3. 5
      NEWS.md
  4. 8
      R/dbi.r
  5. 3
      R/query.r

4
DESCRIPTION

@ -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)

1
NAMESPACE

@ -57,6 +57,7 @@ exportMethods(dbGetStatement)
exportMethods(dbHasCompleted)
exportMethods(dbIsValid)
exportMethods(dbListFields)
exportMethods(dbQuoteIdentifier)
exportMethods(dbSendQuery)
exportMethods(dbUnloadDriver)
import(DBI)

5
NEWS.md

@ -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

8
R/dbi.r

@ -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'),

3
R/query.r

@ -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(

Loading…
Cancel
Save