new GraphResult(id, source, destination, patch)
Parameters:
| Name | Type | Description |
|---|---|---|
id |
string | the id of the associated graphdef |
source |
string | |
destination |
string | |
patch |
olympe.dc.db.GraphPatch |
Methods
-
<static> fromJSON(json)
-
Deserializes a
GraphResultfrom a JSON object or string.Parameters:
Name Type Description jsonstring | Object Returns:
-
forEachBlock(callback)
-
Execute the specified callback for each block of this result
Parameters:
Name Type Description callbackfunction -
getDataAs(writableConstructor)
-
Parameters:
Name Type Description writableConstructorfunction (must extends olympe.dc.Writable)
- Deprecated:
-
- use
olympe.dc.query.GraphResult#getPatchinstead
- use
Returns:
the writable with all the data of this GraphResult
- Type
- T
-
getDestination()
-
Return the destination of this result
Returns:
the destination id
- Type
- string
-
getId()
-
Returns the id of the graphdef associated to this result
Returns:
the associated graphdef id
- Type
- string
-
getPatch()
-
Return the data of this result as a graph patch.
Returns:
The graph data patch of this result
-
newBlock(id, instances)
-
Creates a new graph query block in this result containing the specified instances. If the block already exists, add the specified instances to it.
Parameters:
Name Type Description idstring instancesIterable.<string> Returns:
the block id
- Type
- string
-
toJSON()
-
Serializes this
GraphResultinto a JSON string.Returns:
- Type
- string
Olympe SDK