dm_get_all_pks {dm}R Documentation

Get all primary keys of a dm object

Description

dm_get_all_pks() checks the dm object for primary keys and returns the tables and the respective primary key columns.

Usage

dm_get_all_pks(dm, table = NULL, ...)

Arguments

dm

A dm object.

table

One or more table names, unquoted, to return primary key information for. If given, primary keys are returned in that order. The default NULL returns information for all tables.

...

These dots are for future extensions and must be empty.

Value

A tibble with the following columns:

table

table name,

pk_col

column 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()


[Package dm version 1.0.10 Index]