DBItest (version 1.3)

test_sql: Test SQL methods

Description

Test SQL methods

Usage

test_sql(skip = NULL, ctx = get_default_context())

Arguments

skip
[character()] A vector of regular expressions to match against test names; skip test if matching any.
ctx
[DBItest_context] A test context as created by make_context.

Details

This function defines the following tests:
quote_string
Can quote strings, and create strings that contain quotes and spaces

quote_string_vectorized
Can quote more than one string at once by passing a character vector.

quote_identifier
Can quote identifiers that consist of letters only

quote_identifier_special
Can quote identifiers with special characters, and create identifiers that contain quotes and spaces

quote_identifier_not_vectorized
Character vectors are treated as a single qualified identifier.

write_table
Can write the iris data as a table to the database, but won't overwrite by default.

read_table
Can read the iris data from a database table.

overwrite_table
Can write the iris data as a table to the database, will overwrite if asked.

append_table
Can write the iris data as a table to the database, will append if asked.

append_table
Cannot append to nonexisting table.

temporary_table
Can write the iris data as a temporary table to the database, the table is not available in a second connection and is gone after reconnecting.

table_visible_in_other_connection
A new table is visible in a second connection.

list_tables
Can list the tables in the database, adding and removing tables affects the list. Can also check existence of a table.

list_fields
Can list the fields for a table in the database.

roundtrip_keywords
Can create tables with keywords as table and column names.

roundtrip_quotes
Can create tables with quotes, commas, and spaces in column names and data.

roundtrip_integer
Can create tables with integer columns.

roundtrip_numeric
Can create tables with numeric columns.

roundtrip_numeric_special
Can create tables with numeric columns that contain special values such as Inf and NaN.

roundtrip_logical
Can create tables with logical columns.

roundtrip_logical_int
Can create tables with logical columns, returned as integer.

roundtrip_null
Can create tables with NULL values.

roundtrip_64_bit
Can create tables with 64-bit columns.

roundtrip_character
Can create tables with character columns.

roundtrip_factor
Can create tables with factor columns.

roundtrip_raw
Can create tables with raw columns.

roundtrip_date
Can create tables with date columns.

roundtrip_timestamp
Can create tables with timestamp columns.

roundtrip_rownames
Can create tables with row names.

See Also

Other tests: test_compliance, test_connection, test_driver, test_getting_started, test_meta, test_result