tests/testthat/test-ambiguous_prepare.R

test_that("Test ambiguous prepare statements", {
  con <- local_con()

  res <- dbGetQuery(con, "select ?", 42)
  expect_identical(res[[1]], 42)

  res <- dbGetQuery(con, "select ?", "hello world")
  expect_identical(res[[1]], "hello world")
})

Try the duckdb package in your browser

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

duckdb documentation built on Nov. 5, 2025, 5:41 p.m.