"formatChunk converts data types correctly"
"Data frames should remain unchanged when types match."
"formatChunk converts non-matching types to character"
"Numeric columns in chunk should be converted to character."
"formatChunk throws error for incompatible types"
"format chunk handles int/numeric type conversions ok"
"
  DROP TABLE IF EXISTS @schema.@test_table;
  CREATE TABLE @schema.@test_table (id int, id_2 int);
  INSERT INTO @schema.@test_table (id, id_2) VALUES (1, 2);
  INSERT INTO @schema.@test_table (id, id_2) VALUES (3, 4);
  INSERT INTO @schema.@test_table (id, id_2) VALUES (5, 6);
  INSERT INTO @schema.@test_table (id, id_2) VALUES (7, 8);
  "
"Delete primary key rows function SQLITE"

Error in `eval_bare(quo_get_expr(.quo), quo_get_env(.quo))`: attempt to apply non-function

connectionHandler <- ConnectionHandler$new(connectionDetails = connectionDetails)
columnName = c("cohort_definition_id", "cohort_name", "json", "sql"),
primaryKey = c("yes", "no", "no", "no"),
dataType = c("int", "varchar", "varchar", "varchar")
schemaSql <- generateSqlSchema(schemaDefinition = tableSpecification)
connectionHandler$executeSql(schemaSql, table_prefix = "cd_", database_schema = "main")
test_that("test setConnectionHandler and getConnectionHandler functions", {
sql <- "SELECT * FROM @result_schema.@cohort WHERE cohort_definition_id = @cohort_id"
renderedSql <- cohortNamespace$render(sql, cohort_id = 1)
expect_equal(renderedSql, "SELECT * FROM main.cd_cohort WHERE cohort_definition_id = 1")
result <- cohortNamespace$queryDb("SELECT * FROM @result_schema.@cohort WHERE cohort_definition_id = @cohort_id", cohort_id = 1)
result <- cohortNamespace$executeSql("SELECT * FROM @result_schema.@cohort WHERE cohort_definition_id = @cohort_id", cohort_id = 1)
test_that("create helper function works", {

"test setConnectionHandler and getConnectionHandler functions"
"SELECT * FROM @result_schema.@cohort WHERE cohort_definition_id = @cohort_id"
"SELECT * FROM main.cd_cohort WHERE cohort_definition_id = 1"

test setConnectionHandler and getConnectionHandler functions