Skip to main content
Version: 2.4.7

set_desired Command

The set_desired command sets one or more properties as desired for incoming database objects.

The desired state of each node in the database is merged with this new desired state, so that existing desired state not defined in this command is not touched.

This command assumes that all incoming elements are either objects coming from a query or are object ids. All objects coming from a query will have a property id. This command will return the updated state.

Usage​

set_desired <properties>

Parameters​

ParameterDescriptionRequired?Default Value
propertiesSpace-delimited list of property-value pairs, formatted as <name>=<value>✔️N/A

Examples​

> query is(instance) limit 1 | set_desired a=b b="c" num=2 | list /id, /desired
​id=123, a=b, b=c, num=2
> json ["id1", "id2"] | set_desired a=b | list /id /desired
​id=id1, a=b
​id=id2, a=b