Learn R Programming

SCDB (version 0.5.1)

is.historical: Checks if table contains historical data

Description

Checks if table contains historical data

Usage

is.historical(.data)

Value

TRUE if .data contains the columns: "checksum", "from_ts", and "until_ts". FALSE otherwise.

Arguments

.data

(data.frame(1), tibble(1), data.table(1), or tbl_dbi(1))
Data object.

Examples

Run this code
if (FALSE) { # requireNamespace("RSQLite", quietly = TRUE)
  conn <- get_connection()

  dplyr::copy_to(conn, mtcars, name = "mtcars", temporary = FALSE)
  create_table(mtcars, conn, db_table = id("mtcars_historical", conn))

  is.historical(get_table(conn, "mtcars")) # FALSE
  is.historical(get_table(conn, "mtcars_historical")) # TRUE

  close_connection(conn)
}

Run the code above in your browser using DataLab