View source: R/cdr_delete_row_in_db.R
cdr_delete_row_in_db | R Documentation |
Deletes a row or rows by specifying the unique ids for the rows to delete Note: not implemented in a UI button, but here for administrator use
cdr_delete_row_in_db(
conn_pool = conn_pool,
db_tbl_name = NULL,
value_rowuid = NULL,
key_column = NULL
)
conn_pool |
pool connection object: the pool of connections established by the session |
db_tbl_name |
string: name of the specific database table, or |
value_rowuid |
number or string: the specific the unique ID that corresponds to the row to delete |
key_column |
string: the name of the column with the unique ID |
TRUE for successful deletion
## Not run:
con <- pool::dbPool(DBI::dbConnect(RSQLite::SQLite(), 'iris.db'))
iris <- dplyr::mutate(iris, unique_id = paste0('uid_',dplyr::row_number()))
cdr_make_db_tbls(conn_pool = con, db_tbl = iris)
print(here::here('iris.db'))
cdr_delete_row_in_db(
conn_pool = con,
db_tbl_name = 'iris', #'iris_deltas'
value_rowuid = 'uid_1',
key_column = 'unique_id'
)
pool::poolClose(con)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.