meta
Gets meta-information (like the mount name of an operation).
Member | Description |
---|---|
constructor(definition) | Constructor method. Returns a value of type rell.meta describing the specified definition. The definition can be an entity , object , operation , query . |
simple_name: text | Represents the simple name of the definition. For example, bar if the full name is lib:foo.bar . |
full_name: text | Represents the full name, including the module name, in the format <module_name>:[<namespace_path>.]<simple_name> . For instance, :foo for the root module, my_module:bar , or my_module:my_namespace.bar . |
module_name: text | Represents the module name. It can be an empty string for the root module. |
mount_name: text | Represents the mount name. If the definition has a mount name, it provides the mount name; otherwise, it generates a runtime error. All supported definitions have mount names. |
Example - getting the mount name of an operation
operation my_op() {}
query get_op_name() = rell.meta(my_op).mount_name;
This example retrieves the mount name of the my_op
operation.