Skip to contents

This is a generic function for inserting a new record into one of the tables in the database.

Usage

insert_record(..., test_db = FALSE, new_id_prefix = NULL, tbl_name = NULL)

Arguments

...

List of values to add include in the new record.

test_db

Is this connection to the test database (TRUE) or not (FALSE)? Defaults to FALSE.

new_id_prefix

An optional ID prefix for the new record (e.g. "A" in the assets table).

tbl_name

The name of the table into which this record is being inserted.

Value

a tibble with one row containing the newly-inserted record.