dm_has_pk() checks if a given table has columns marked as its primary key.
See also
Other primary key functions:
dm_add_pk(),
dm_add_uk(),
dm_get_all_pks(),
dm_get_all_uks(),
dm_rm_pk(),
dm_rm_uk(),
enum_pk_candidates()
Examples
dm_nycflights13() %>%
dm_has_pk(flights)
#> [1] FALSE
dm_nycflights13() %>%
dm_has_pk(planes)
#> [1] TRUE
