Learn R Programming

acdcquery (version 1.2.3)

compare_sqlite_to_release: Compare local SQLite database to GitHub release hash

Description

Compares the SHA256 hash of a local SQLite database file with the hash file stored in a GitHub release.

Usage

compare_sqlite_to_release(
  owner,
  repo,
  asset_name,
  local_sqlite_path,
  tag = NULL,
  token = Sys.getenv("GITHUB_PAT"),
  algo = "sha256"
)

Value

TRUE if hashes match, FALSE otherwise.

Arguments

owner

Repository owner.

repo

Repository name.

asset_name

Name of the SQLite asset (used to derive hash filename).

local_sqlite_path

Path to local SQLite database.

tag

Optional release tag. If NULL, uses latest release.

token

Optional GitHub token. Defaults to Sys.getenv("GITHUB_PAT").

algo

Hash algorithm (default: "sha256").

Details

This avoids downloading the full database when checking for updates.

Examples

Run this code
if (FALSE) {
compare_sqlite_to_release(
  owner = "myuser",
  repo = "myrepo",
  asset_name = "database.sqlite",
  local_sqlite_path = "database.sqlite"
)
}

Run the code above in your browser using DataLab