DBItest (version 1.5-1)

spec_result_roundtrip: spec_result_roundtrip

Description

spec_result_roundtrip

Arguments

Specification

The column types of the returned data frame depend on the data returned:

  • integer for integer values between -2^31 and 2^31 - 1

  • numeric for numbers with a fractional component

  • logical for Boolean values (some backends may return an integer)

  • character for text

  • lists of raw for blobs (with NULL entries for SQL NULL values)

  • coercible using as.Date() for dates (also applies to the return value of the SQL function current_date)

  • coercible using hms::as.hms() for times (also applies to the return value of the SQL function current_time)

  • coercible using as.POSIXct() for timestamps (also applies to the return value of the SQL function current_timestamp)

  • NA for SQL NULL values

If dates and timestamps are supported by the backend, the following R types are used:

  • Date for dates (also applies to the return value of the SQL function current_date)

  • POSIXct for timestamps (also applies to the return value of the SQL function current_timestamp)

R has no built-in type with lossless support for the full range of 64-bit or larger integers. If 64-bit integers are returned from a query, the following rules apply:

  • Values are returned in a container with support for the full range of valid 64-bit values (such as the integer64 class of the bit64 package)

  • Coercion to numeric always returns a number that is as close as possible to the true value

  • Loss of precision when converting to numeric gives a warning

  • Conversion to character always returns a lossless decimal representation of the data