dm_get_pk() returns the names of the
columns marked as primary key of a table of a
If no primary key is
set for the table, an empty character vector is returned.
A table in the
A list with character vectors with the column name(s) of the
primary keys of
Currently, keys consisting of more than one column are not supported. This feature is planned for dm 0.2.0. Therefore the function may return vectors of length greater than one in the future.
Similarly, each table currently can have only one primary key.
This restriction may be lifted in the future.
For this reason, and for symmetry with
this function returns a slit of character vectors.
dm_nycflights13() %>% dm_get_pk(flights)#> <list_of<character>>dm_nycflights13() %>% dm_get_pk(planes)#> <list_of<character>> #> [] #>  "tailnum" #>