Skip to contents

This function checks whether Micronix barcodes provided in a user-uploaded table exist or don't exist (based on error_if_exists parameter) in the main database.

Usage

check_micronix_barcodes_exist(
  con,
  user_data,
  row_number_col,
  micronix_col,
  error_if_exists = TRUE
)

Arguments

con

A database connection object.

user_data

The name of the table containing user-uploaded data.

row_number_col

The name of the column in the user-uploaded table that contains row numbers.

micronix_col

The name of the column in the user-uploaded table that contains the Micronix barcodes.

error_if_exists

A logical value. If TRUE, function returns error if barcode exists in the database, if FALSE, function returns error if barcode doesn't exist.

Value

An instance of the ErrorData class if errors are found, or NULL if there are no errors.