R/driver-sqlite.R

#' @include dbi-connection.R
NULL

#' @export
#' @rdname DBI-classes
setClass("SQLite", contains = "OdbcConnection")

#' @export
#' @rdname odbcDataType
#' @usage NULL
setMethod("odbcDataType", "SQLite",
  function(con, obj, ...) {
    switch_type(
      obj,
      factor = "TEXT",
      datetime = "NUMERIC",
      date = "NUMERIC",
      binary = "BLOB",
      integer = "INTEGER",
      int64 = "INTEGER",
      double = "REAL",
      character = "TEXT",
      logical = "NUMERIC",
      list = "TEXT",
      stop("Unsupported type", call. = FALSE)
    )
  }
)

Try the odbc package in your browser

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

odbc documentation built on June 22, 2024, 9:47 a.m.