tests/testthat/test-dbQuoteLiteral.R

test_that("integer64 values are treated as bigints, not floats", {
  con <- postgresDefault()
  on.exit(dbDisconnect(con))

  x <- structure(4.94065645841247e-324, class = "integer64")

  expect_equal(
    as.character(dbQuoteLiteral(con, x)),
    "1::int8"
  )
})

Try the RPostgres package in your browser

Any scripts or data that you put into this service are public.

RPostgres documentation built on Oct. 23, 2023, 1:06 a.m.