tests/testthat/test-utils.R

test_that("dbDataType for blob", {

  expect_identical(
    db_data_type_blob(
      structure(list(), class = "adbcsqlite_driver_sqlite")
    ),
    "BLOB"
  )

  expect_identical(
    db_data_type_blob(
      structure(list(), class = "adbcpostgresql_driver_postgresql")
    ),
    "bytea"
  )

  expect_error(db_data_type_blob(structure(list(), class = "foo")))
})

Try the adbi package in your browser

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

adbi documentation built on May 29, 2024, 7:12 a.m.