dm_get_all_pks() checks the dm object for primary keys and
returns the tables and the respective primary key columns.
Value
A tibble with the following columns:
tabletable name,
pk_colcolumn name(s) of primary key, as list of character vectors.
See also
Other primary key functions:
dm_add_pk(),
dm_add_uk(),
dm_get_all_uks(),
dm_has_pk(),
dm_rm_pk(),
dm_rm_uk(),
enum_pk_candidates()
Examples
dm_nycflights13() %>%
dm_get_all_pks()
#> # A tibble: 4 × 3
#> table pk_col autoincrement
#> <chr> <keys> <lgl>
#> 1 airlines carrier FALSE
#> 2 airports faa FALSE
#> 3 planes tailnum FALSE
#> 4 weather origin, time_hour FALSE
