tests/testthat/_snaps/multi_statement.md

empty statement gives an error

rapi_prepare: No statements to execute

multiple statements can be used in one call

Code
  DBI::dbGetQuery(con, paste("DROP TABLE IF EXISTS integers;", query))
Output
     i
  1  0
  2  1
  3  2
  4  3
  5  4
  6  5
  7  6
  8  7
  9  8
  10 9

statements can be splitted apart correctly

Code
  DBI::dbGetQuery(con, a <- paste("--Multistatement testing; testing",
    "/*  test;   ", "--test;", ";test */", "create table temp_test as ", "select",
    "'testing_temp;' as temp_col", ";", "select * from temp_test;", sep = "\n"))
Output
         temp_col
  1 testing_temp;


Try the duckdb package in your browser

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

duckdb documentation built on Oct. 30, 2024, 5:06 p.m.