tests/testthat/test-dbQuoteIdentifier_MariaDBConnection_Id.R

test_that("dbQuoteIdentifier() and def", {
  skip_if_not(mariadbHasDefault())

  conn <- withr::local_db_connection(mariadbDefault())

  expect_equal(dbQuoteIdentifier(conn, Id("def", "a", "b")), SQL("`a`.`b`"))
  expect_equal(dbQuoteIdentifier(conn, Id("a", "b")), SQL("`a`.`b`"))
  expect_equal(dbQuoteIdentifier(conn, Id("def", "a")), SQL("`def`.`a`"))
})

Try the RMariaDB package in your browser

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

RMariaDB documentation built on April 12, 2025, 2:11 a.m.