File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed
src/content/docs/d1/worker-api Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -247,7 +247,7 @@ return new Response(dump, {
247247
248248Starts a D1 Session which activates read replication.
249249
250- ``` js
250+ ``` ts
251251const session = env .DB .withSession (" <constraint> or bookmark" );
252252```
253253
@@ -263,3 +263,22 @@ const session = env.DB.withSession("<constraint> or bookmark");
263263
264264#### Return values
265265
266+ - <code >D1DatabaseSession</code >: <Type text = " Object" />
267+ - An object which contains the methods [ ` prepare() ` ] ( /d1/worker-api/d1-database#prepare ) and [ ` getBookmark ` ] ( /d1/worker-api/d1-database#getbookmark ) .
268+
269+ ### ` getBookmark `
270+
271+ Retrieves the ` bookmark ` from the D1 Session.
272+
273+ ``` ts
274+ const session = db .withSession (" first-primary" );
275+ return { bookmark } = session .getBookmark ();
276+ ```
277+
278+ #### Parameters
279+
280+ - None
281+
282+ #### Return values
283+
284+ -
You can’t perform that action at this time.
0 commit comments