Skip to content

Commit

Permalink
Update jsoniq-tutorial.md
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesLichtenberger authored Nov 20, 2023
1 parent 339f2ea commit 10c756c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/jsoniq-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ Result is:
```json
[{"diffRev1toRev2":[{"update":{"nodeKey":2,"deweyID":"1.17.17","depth":2,"name":"bar"}}]},{"diffRev2toRev3":[{"replace":{"oldNodeKey":3,"newNodeKey":4,"deweyID":"1.17.17.0","depth":2,"type":"boolean","data":false}}]}]
```
Each node is assigned a unique, monotonically increasing 64Bit `nodeKey` (`ID`), which never changes and is not reassigned once the node has been removed.
In our example we first updated the field name in revision 2 to `"bar"`. We then replace the value, the node with `nodeKey` 3 and `true` with a new node getting `nodeKey` 4 assigned having the value `false`.

We can also add resources from a specific URL (as in this [Twitter](https://github.com/sirixdb/sirix/blob/main/bundles/sirix-core/src/test/resources/json/twitter.json) example):

Expand Down

0 comments on commit 10c756c

Please sign in to comment.