Learn R Programming

dm (version 0.0.6.9000)

dm_has_fk: Does a reference exist?

Description

dm_has_fk() checks if a foreign key reference exists between two tables in a dm.

Usage

dm_has_fk(dm, table, ref_table)

Arguments

dm

A dm object.

table

A table in the dm.

ref_table

The table to be checked if it is referred to.

Value

A boolean value: TRUE if a reference from table to ref_table exists, FALSE otherwise.

See Also

Other foreign key functions: dm_add_fk(), dm_enum_fk_candidates(), dm_get_all_fks(), dm_get_fk()

Examples

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

Run the code above in your browser using DataLab