From 70d0693973ce15696efa8227446ebb8629780767 Mon Sep 17 00:00:00 2001 From: Johannes Lichtenberger Date: Mon, 20 Nov 2023 19:13:23 +0100 Subject: [PATCH] Update jsoniq-tutorial.md --- docs/jsoniq-tutorial.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/jsoniq-tutorial.md b/docs/jsoniq-tutorial.md index 6cdbfdd..a5de286 100644 --- a/docs/jsoniq-tutorial.md +++ b/docs/jsoniq-tutorial.md @@ -125,13 +125,13 @@ Thus, we now have 3 revisions: ```xquery let $revisions := jn:all-times(jn:doc('mycol.jn','resource2')) for $revision in $revisions -return {"revision": $revision, "timestamp":sdb:timestamp($revision), "data": $revision} +return {"revision": sdb:revision($revision), "timestamp":sdb:timestamp($revision), "data": $revision} ``` Result is: ```json -{"revision":{"foo":true},"timestamp":"2023-11-19T22:17:55:717000Z","data":{"foo":true}} {"revision":{"bar":true},"timestamp":"2023-11-19T22:19:38:157000Z","data":{"bar":true}} {"revision":{"bar":false},"timestamp":"2023-11-20T17:59:38:68000Z","data":{"bar":false}} +{"revision":1,"timestamp":"2023-11-19T22:17:55:717000Z","data":{"foo":true}} {"revision":2,"timestamp":"2023-11-19T22:19:38:157000Z","data":{"bar":true}} {"revision":3,"timestamp":"2023-11-20T17:59:38:68000Z","data":{"bar":false}} ``` The timestamps are the transactional commit timestamps, the system time when data is known to the system (one axis of the bitemporality).