Get a summary of all foreign key relations in a dm.

dm_get_all_fks(dm)

Arguments

dm

A dm object.

Value

A tibble with the following columns:

child_table

child table,

child_fk_cols

foreign key column in child table,

parent_table

parent table.

Compound keys

Currently, keys consisting of more than one column are not supported. This feature is planned for dm 0.2.0. Therefore the child_fk_cols column may contain vectors of length greater than one.

See also

Other foreign key functions: dm_add_fk(), dm_enum_fk_candidates(), dm_get_fk(), dm_has_fk()

Examples

dm_nycflights13() %>% dm_get_all_fks()
#> # A tibble: 3 x 3 #> child_table child_fk_cols parent_table #> <chr> <keys> <chr> #> 1 flights carrier airlines #> 2 flights origin airports #> 3 flights tailnum planes