Skip to content

Commit f1d267a

Browse files
jason-price-mongodbjason-price-mongodb
andauthored
DOCSP-23619 cursor example updates (#2810)
* DOCSP-23619-cursor-example-updates * DOCSP-23619-cursor-example-updates * DOCSP-23619-cursor-example-updates * DOCSP-23619-cursor-example-updates * DOCSP-23619-cursor-example-updates --------- Co-authored-by: jason-price-mongodb <[email protected]>
1 parent 951ffd8 commit f1d267a

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

source/reference/limits.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,8 @@ Sessions
544544
.. code-block:: bash
545545

546546
var session = db.getMongo().startSession()
547-
var sessionId = session.getSessionId().id
547+
var sessionId = session
548+
sessionId // show the sessionId
548549

549550
var cursor = session.getDatabase("examples").getCollection("data").find().noCursorTimeout()
550551
var refreshTimestamp = new Date() // take note of time at operation start

source/reference/method/cursor.maxTimeMS.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ session using the :dbcommand:`refreshSessions` command. For example:
103103
.. code-block:: javascript
104104

105105
var session = db.getMongo().startSession()
106-
var sessionId = session.getSessionId().id
106+
var sessionId = session
107+
sessionId // show the sessionId
107108

108109
var cursor = session.getDatabase("examples").getCollection("data").find().noCursorTimeout()
109110
var refreshTimestamp = new Date() // take note of time at operation start

source/reference/method/cursor.noCursorTimeout.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ session using the :dbcommand:`refreshSessions` command. For example:
5151
.. code-block:: bash
5252

5353
var session = db.getMongo().startSession()
54-
var sessionId = session.getSessionId().id
54+
var sessionId = session
55+
sessionId // show the sessionId
5556

5657
var cursor = session.getDatabase("examples").getCollection("data").find().noCursorTimeout()
5758
var refreshTimestamp = new Date() // take note of time at operation start

0 commit comments

Comments
 (0)