parse_constraints: Parse foreign key constraint data frame into list...

View source: R/foreign_keys.R

parse_constraintsR Documentation

Parse foreign key constraint data frame into list representation

Description

The representation is

Usage

parse_constraints(constraints_table)

Arguments

constraints_table

Table of constraints to parse.

Details

table_name = list( serial = list( serial_field1, serial_field2, ... ), foreign = list( field_from_table_name = list( table1 = field1, table2 = field2, ... ), ... ) )

For a table we list the columns in that table which are serials i.e. the columns which are generated automatically by the db. And the fields which are referenced by a foreign key constraint. The way to read the foreign section is field_from_table_name is a column in table_name which is used as the referenced table in foreign key constraint from field1 in table1 and field2 in table2. The implication being that table_name must exist before field1 of table2 can be written to.

Value

A list representing foreign key constraints.


vimc/dettl documentation built on Oct. 6, 2022, 2:13 p.m.