RelatedRecords {laminr} | R Documentation |
A container for accessing records with a one-to-many or many-to-many relationship.
new()
Creates an instance of this R6 class. This class should not be instantiated directly,
but rather by connecting to a LaminDB instance using the connect()
function.
RelatedRecords$new(instance, registry, field, related_to, api)
instance
The instance the records list belongs to.
registry
The registry the records list belongs to.
field
The field associated with the records list.
related_to
ID or UID of the parent that records are related to.
api
The API for the instance.
df()
Get a data frame summarising records in the registry
RelatedRecords$df(limit = 100, verbose = FALSE)
limit
Maximum number of records to return
verbose
Boolean, whether to print progress messages
A data.frame containing the available records
print()
Print a RelatedRecords
RelatedRecords$print(style = TRUE)
style
Logical, whether the output is styled using ANSI codes
to_string()
Create a string representation of a RelatedRecords
RelatedRecords$to_string(style = FALSE)
style
Logical, whether the output is styled using ANSI codes
A cli::cli_ansi_string
if style = TRUE
or a character vector