Learn R Programming

dm (version 0.0.6)

dm_get_fk: Retrieve the name of the column marked as a foreign key, pointing from one table of a dm to another table.

Description

Retrieve the name of the column marked as a foreign key, pointing from one table of a dm to another table.

Usage

dm_get_fk(dm, table, ref_table)

Arguments

dm

A dm object.

table

A table in the dm.

ref_table

The table that is referenced from table.

Value

A character vector with the column name(s) of table, pointing to the primary key of ref_table.

See Also

Other foreign key functions: dm_add_fk(), dm_enum_fk_candidates(), dm_get_all_fks(), dm_has_fk(), dm_rm_fk()

Examples

Run this code
# NOT RUN {
dm_get_fk(dm_nycflights13(), flights, airports)
# }

Run the code above in your browser using DataLab