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
GraphResult
from a JSON object or string.Parameters:
Name Type Description json
string | Object Returns:
-
forEachBlock(callback)
-
Execute the specified callback for each block of this result
Parameters:
Name Type Description callback
function -
getDataAs(writableConstructor)
-
Parameters:
Name Type Description writableConstructor
function (must extends olympe.dc.Writable)
- Deprecated:
-
- use
olympe.dc.query.GraphResult#getPatch
instead
- 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 id
string instances
Iterable.<string> Returns:
the block id
- Type
- string
-
toJSON()
-
Serializes this
GraphResult
into a JSON string.Returns:
- Type
- string