Function naming logic (original) (raw)
This vignette describes the logic behind the names of the {dm}-functions.
In general, the functions are implemented in such a way that no function can handle instances of both dm classes (dm and dm_zoomed) as an argument. In most situations, a dm_zoomed behaves like a table and there are mostly no explicit functions available for this class, but rather methods (see vignette “Zooming and manipulating tables”.
Prefixes
dm_: There are two cases for this prefix:- The function takes a
dmobject as a first argument - The function constructs a
dmobject from other objects
- The function takes a
check_: Certain tests on the arguments are performed and an error is thrown in case they are not passed. If the tests are passed, the first argument is returned invisibly.examine_: The function executes checks and returns an object containing an overview of the results of the checks.
Most important extended prefixes dm_..._:
dm_examine_: The function examines several aspects of admobjectdm_add_: Adds either key constraints or new tables to admdm_get_: Retrieves a specific piece of information about thedm(often a part of its constituents)dm_rm_: Removes either key constraints or tables from adm
Suffixes
_dm: Validators, checkers, or coercers_to_tbl: Data from admis processed in a way that a tibble is produced_candidates: If key-candidates are to be calculated and presented in tibble-form_pk(s): Relates to primary key(s)_fk(s): Relates to foreign key(s)_tbl: Add/remove/select/rename a tibble to/from/within admobject_colors: Relates to the colors for the visualization of admobject_zoomed: Insert, update, or discard the zoomed table. In combination with the prefixdm_, this indicates that the first argument is adm_zoomedrather than adm.