dm (version 0.2.8)

dm_get_all_pks: Get all primary keys of a dm object

Description

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

Usage

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

Arguments

dm

A dm object.

table

One or more table names, as character vector, to return primary key information for. 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_cols

column name(s) of primary key, as list of character vectors.

See Also

Other primary key functions: dm_add_pk(), dm_has_pk(), dm_rm_pk(), enum_pk_candidates()

Examples

Run this code
# NOT RUN {
dm_nycflights13() %>%
  dm_get_all_pks()
# }

Run the code above in your browser using DataLab