tests/testthat/test-isSqlReservedWord.R

library(testthat)

test_that("isSqlReservedWord works", {
  expect_true(all(isSqlReservedWord(c("TRUE", "CASE", "IF", "#if", "#IF"))))
  expect_false(any(isSqlReservedWord(c("Tbl1", "#tempTable"))))
  expect_warning(isSqlReservedWord("TRUE", warn = T), "reserved")
})

Try the DatabaseConnector package in your browser

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

DatabaseConnector documentation built on Nov. 8, 2023, 5:07 p.m.