tests/testthat/test_330_stmt_values.R

testthat::context("Statement Values class")

testthat::test_that("We can generate a simple VALUES statement", {
  row1 <- ExprListValues$new(list(ExprValue$new("abc"),
                                  ExprValue$new(123)))
  x <- StmtValues$new(list(row1))
  testthat::expect_equal(x$toString(), "VALUES ('abc', 123)")

  row2 <- ExprListValues$new(list(ExprValue$new("def"),
                                  ExprValue$new(456)))
  x <- StmtValues$new(list(row1, row2))
  testthat::expect_equal(x$toString(), "VALUES ('abc', 123), ('def', 456)")
})

Try the sqlq package in your browser

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

sqlq documentation built on Sept. 16, 2025, 9:10 a.m.