Skip to contents

This function checks that the DBS bag label is unique at a location.

Usage

validate_dbs_bag_label_is_unique(
  con,
  table_name,
  row_number_col,
  bag_label_col,
  freezer_col,
  shelf_col,
  basket_col,
  error_if_exists = FALSE
)

Arguments

con

A database connection.

table_name

The name of the table to check.

row_number_col

The name of the row number column.

bag_label_col

The name of the bag label column.

freezer_col

The name of the freezer column.

shelf_col

The name of the shelf column.

basket_col

The name of the basket column.

error_if_exists

If TRUE, returns an error if the bag label exists. If FALSE, returns an error if the bag label does not exist.

Value

A list containing validation errors, if any.