Skip to main content

System queries

System queries provide information about the Rell environment, Postchain version, build metadata, and your dapp’s structure.

rell.get_rell_version(): text​

Retrieves Rell's version information.

Returns a string containing the Rell version, for example "0.10.1".

rell.get_postchain_version(): text​

Retrieves Postchain's version information.

Returns a string containing the Postchain version, for example "3.0.0".

rell.get_build(): text​

Retrieves Rell's detailed build information.

Returns a string containing the Rell build description, for example "rell: 0.10.1; postchain: 3.0.0; time: 2019-11-25T17:25:52+0000; branch: v0.10.1; commit: f875de6 (2019-11-25T10:37:18+0000); dirty: true".

rell.get_build_details(): map<text, text>​

Retrieves Rell's detailed build information as a key-value map.

Returns a dictionary containing Rell's build details:

rell.branch: v0.10.1
rell.build.time: 2019-11-25T17:25:52+0000
rell.version: 0.10.1
rell.commit.id: f875de6
rell.commit.id.full: f875de60555284a53442e072e4fd4dda0029f792
rell.commit.message.short: Commit message...
rell.commit.message.full: Commit message...
rell.commit.time: 2019-11-25T10:37:18+0000
rell.dirty: true
postchain.version: 3.0.0
kotlin.version: 1.3.21

rell.get_app_structure(): map<text, gtv>​

Shows how your Rell dapp is built, revealing its modules and definitions. Definitions are entities, objects, structs, enums, operations, queries and functions.

Returns GTV. Attributes (values) of entities, objects, structs and enums are returned as an array.

Rell code example:

struct module_args {
x: integer;
y: text;
}

Corresponding app structure example (fragment):

{
"structs": {
"module_args": {
"attributes": [
{ "mutable": 0, "name": "x", "type": "integer" },
{ "mutable": 0, "name": "y", "type": "text" }
]
}
}
}

rell.get_mount_names(kinds: list<text>, modules: list<text>): map<text, list<text>>​

Retrieves the mount names of definitions (queries, operations, entities, and objects) from specified modules.

Parameters:

  • kinds - a list specifying which definition types to include. Valid values are "query", "operation", "entity", and "object". Pass an empty list to include all types.
  • modules - a list of module names to retrieve definitions from. Pass an empty list to include all modules.

Throws an error for invalid kind values or invalid module names. If a specified module is not found, it is silently ignored.

Returns a map<text, list<text>> where each key is a pluralized definition type ("queries", "operations", "entities", or "objects") and the value is a list of mount names for that type.

rell.get_module_args(modules: list<text>): map<text, map<text, gtv>>​

Retrieves the module arguments for specified modules.

The modules parameter is a list of module names to retrieve module arguments from. Pass an empty list to include all modules. Throws an error for invalid module names. If a specified module is not found, it is silently ignored.

Returns a map<text, map<text, gtv>> where each key is a module name and the value is a map of that module's arguments.