A field in a registry.
type(character(1))
The type of the field.
through(list() or NULL)
The through value of the field.
field_name(character(1))
The field name.
registry_name(character(1))
The registry name.
column_name(character(1))
The column name.
module_name(character(1))
The module name.
is_link_table(logical(1))
Whether the field is a link table.
relation_type(character(1) or NULL)
The relation type. Can be one of: "one-to-many", "many-to-one", "many-to-many".
related_field_name(character(1) or NULL)
The related field name.
related_registry_name(character(1) or NULL)
The related registry name.
related_module_name(character(1) or NULL)
The related module name.
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.
Field$new(
type,
through,
field_name,
registry_name,
column_name,
module_name,
is_link_table,
relation_type,
related_field_name,
related_registry_name,
related_module_name
)typeThe type of the field. Can be one of: "IntegerField", "JSONField", "OneToOneField", "SmallIntegerField", "BigIntegerField", "AutoField", "BigAutoField", "BooleanField", "TextField", "DateTimeField", "ManyToManyField", "CharField", "ForeignKey"
throughIf the relation type is one-to-many, many-to-one, or many-to-many, This value will be a named list with keys 'left_key', 'right_key', 'link_table_name'.
field_nameThe name of the field in the registry. Example: "name".
registry_nameThe name of the registry. Example: "user".
column_nameThe name of the column in the database. Example: "name".
module_nameThe name of the module. Example: "core".
is_link_tableWhether the field is a link table.
relation_typeThe type of relation. Can be NULL or one of: "one-to-one", "many-to-one", "many-to-many".
related_field_nameThe name of the related field in the related registry. Example: "name".
related_registry_nameThe name of the related registry. Example: "user".
related_module_nameThe name of the related module. Example: "core".
styleLogical, whether the output is styled using ANSI codes
to_string()Create a string representation of a Field
Field$to_string(style = FALSE)styleLogical, whether the output is styled using ANSI codes
A cli::cli_ansi_string if style = TRUE or a character vector