Checks availability of unique ID in DB
cdr_chk_uniq_id.Rd
For a user to create or delete a new row observation, the ID for the unique ID column must not already be used. Function checks user requested unique ID against what's already in the DB.
Usage
cdr_chk_uniq_id(db_tbl, input_uid, key_column, chk_for = c("create", "delete"))
Arguments
- db_tbl
tibble object: for primary table in server memory
- input_uid
char string: the unique ID you'd like to to add/remove for the observation you're creating/deleting
- key_column
char string: that describes the column or field the UID is in
- chk_for
one of 'create' or 'delete': describing whether the user wants to make a new UID or delete a row denoted by a UID. Create checking is slightly more restrictive because it's capital insensitive.