| dm_get_all_uks {dm} | R Documentation |
Get all unique keys of a dm object
Description
dm_get_all_uks() checks the dm object for unique keys
(primary keys, explicit and implicit unique keys) and returns the tables and
the respective unique key columns.
Usage
dm_get_all_uks(dm, table = NULL, ...)
Arguments
dm |
A |
table |
One or more table names, unquoted,
to return unique key information for.
The default |
... |
These dots are for future extensions and must be empty. |
Details
There are 3 kinds of unique keys:
-
PK: Primary key, set bydm_add_pk() -
explicit UK: Unique key, set bydm_add_uk() -
implicit UK: Unique key, not explicitly set, but referenced by a foreign key.
Value
A tibble with the following columns:
tabletable name,
uk_colcolumn name(s) of primary key, as list of character vectors,
kindkind of unique key, see details.
See Also
Other primary key functions:
dm_add_pk(),
dm_add_uk(),
dm_get_all_pks(),
dm_has_pk(),
dm_rm_pk(),
dm_rm_uk(),
enum_pk_candidates()
Examples
dm_nycflights13() %>%
dm_get_all_uks()