delete_cds_records: Delete records from a CDS instance based on a cds_df.

Description Usage Arguments Details Value

View source: R/record_manipulation.R

Description

This function will send chained DELETE requests for each record found in the provided in the cds_df. USE WITH CAUTION.

Usage

1
2
3
4
5
6
delete_cds_records(
  cds_df,
  cds_instance_name,
  fail_safe_entity_name = NULL,
  force_operation = FALSE
)

Arguments

cds_df

A cds_df created via calling download_cds() filtered for records you want to delete from CDS.

cds_instance_name

A character scalar used in initialize_cds_token() to name a CDS instance.

fail_safe_entity_name

A character scalar, bu default NULL. This argument is here to avoid calling this function accidentally in you analysis workflow. You need to provide the logical name of an entity from which you want to remove records (e.g. "contact", "task"). By default NULL to display a usefull warning instead of generic R's warning about an undefined parameter.

force_operation

A logical scalar indicating whether the optimistic concurrency check should be performed. This ensuers that you are not deleting records which changes after you downloaded them. Set to FALSE only if you know what you are doing! More info on optimistic concurrency control in the Web API can be found here.

Details

If not all request resulter in success, a warning is displayed. You can assign the result of this function to investigate.

Value

List of httr requests objects for each record deletion. Useful to investigate whether all requests went through and repeat for those which did not.


jarekkupisz/cdsR documentation built on Dec. 20, 2021, 9:05 p.m.