Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagelua
function getValue(sourcenode, [subpath], [default])
function getValue(nodepath, [default])

Returns the value contained in the specified database nodesource/path parameters. The return value(s) vary depending on the type of the node. If the node does not exist or if the node is a non-value type, then the default values passed in will be returned or nil if no default values are specified.

Parameters

sourcenode   (string (or databasenode))   
A data node identifier path (or a 
databasenode object ) representing the parent of the target node

subpath   (string)   [optional]
If the first parameter has type databasenode, then this parameter specifies the relative data node identifier path from the specified node object.

nodepath   (string)   
A data base path identifier.

default   (...)   [optional]
The value(s) to be returned if getValue fails. (node does not exist; or non-value node)

...

Code Block
languagelua
function setValue(sourcenode, [subpath], type, value)
function setValue(nodepath, type, value)

Sets the data in the specified database node paththe by the source/path parameters. If the node exists already, the type value must match the existing database node type. If the node does not exist, a new node will be created with the specified type. The format of the value parameter(s) depends on the type of the node.

Parameters

sourcenode   (string (or databasenode))   
A data node identifier path (or a 
databasenode object ) representing the parent of the target node

subpath   (string)   [optional]
If the first parameter has type databasenode, then this parameter specifies the relative data node identifier path from the specified node object.

nodepath   (string)   
A data base path identifier.

type   (string)   
Identifier for the data type of the new or existing node.

...