edit_data_tables: Edit data tables

edit_data_tablesR Documentation

Edit data tables

Description

Edit a set of data tables while maintaining consistency among foreign keys

Usage

delete_rows(
  pk_value,
  table_name,
  pk_name = paste0(table_name, "_id"),
  tables,
  model
)

Arguments

pk_value

Value of the primary key to delete

table_name

Name of the table to delete from

pk_name

Name of the primary key column. Defaults to the table name + "_id".

tables

Named list of data tables

model

dm object describing data model

Details

When calling delete_rows, a side effect is that only rows that are related via foreign keys to rows in table_name are kept. Therefore, table_name should always be the primary table.

Value

dm object with filtered tables


UW-GAC/AnvilDataModels documentation built on Nov. 3, 2024, 7:33 p.m.