Skip to content

Commit

Permalink
feat: Default to bigint = "integer"
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Dec 16, 2023
1 parent 953c928 commit 603372b
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions R/AdbiConnection.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,13 @@ DBI::dbWithTransaction

resolve_bigint <- function(x) {

has_bit64 <- requireNamespace("bit64", quietly = TRUE)

if (is.null(x)) {
if (has_bit64) {
x <- "integer64"
} else {
x <- "character"
}
x <- "integer"
}

res <- match.arg(x, c("integer", "numeric", "character", "integer64"))

if (res == "integer64" && !has_bit64) {
if (res == "integer64" && !requireNamespace("bit64", quietly = TRUE)) {
stop("Need to install bit64.", call. = FALSE)
}

Expand Down

0 comments on commit 603372b

Please sign in to comment.