Skip to contents

Write index or contents urls directly to the local database

Usage

cas_write_db_urls(
  urls,
  index = FALSE,
  overwrite = FALSE,
  db_connection = NULL,
  disconnect_db = FALSE,
  quiet = FALSE,
  check_previous = TRUE,
  ...
)

Arguments

urls

A data frame with five columns, such as casdb_empty_contents_id, or a character vector.

index

Logical, defaults to FALSE. If TRUE, downloaded files will be considered index files. If not, they will be considered contents files. See Readme for a more extensive explanation.

overwrite

Logical, defaults to FALSE. If TRUE, checks if matching data are previously held in the table and overwrites them. This should be used with caution, as it may overwrite completely the selected table.

db_connection

Defaults to NULL. If NULL, uses local SQLite database. If given, must be a connection object or a list with relevant connection settings (see example).

disconnect_db

Defaults to TRUE. If FALSE, leaves the connection to database open.

quiet

Defaults to FALSE. If set to TRUE, messages on number of lines added are not shown.

check_previous

Defaults to TRUE. If set to FALSE, the given input is stored in the database without checking if the same url had already been stored.

...

Passed to cas_get_db_file().