Read sitemap from local database
Arguments
- 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).
- ...
Passed to
cas_get_db_file()
.
Value
A data frame with three columns and data stored in the sitemap
table of the local database. The data frame has zero rows if the database
does not exist or no data was previously stored there.
Examples
cas_set_options(
base_folder = fs::path(fs::path_temp(), "R", "castarter_data"),
db_folder = fs::path(fs::path_temp(), "R", "castarter_data"),
project = "example_project",
website = "example_website"
)
cas_enable_db()
cas_write_db_sitemap(sitemap = "https://example.com/sitemap.xml")
#> ✔ Urls added to sitemap table: 1
cas_read_db_sitemap()
#> # Source: table<`sitemap`> [?? x 1]
#> # Database: sqlite 3.47.1 [/tmp/RtmpSOhy4K/R/castarter_data/cas_example_project_example_website_db.sqlite]
#> sitemap_url
#> <chr>
#> 1 https://example.com/sitemap.xml