Skip to content

Commit 38d780f

Browse files
committed
Undoing IA changes to avoid becoming too agreesive
1 parent 048f3d5 commit 38d780f

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

src/content/docs/durable-objects/api/sql-storage.mdx

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,12 @@
22
title: SQL storage
33
pcx_content_type: concept
44
sidebar:
5-
order: 6
5+
order: 7
66

77
---
88

99
import { Render, Type, MetaInfo, GlossaryTooltip } from "~/components";
1010

11-
The Durable Object Storage API allows <GlossaryTooltip term="Durable Object">Durable Objects</GlossaryTooltip> to access transactional and strongly consistent storage. A Durable Object's attached storage is private to its unique instance and cannot be accessed by other objects.
12-
13-
:::note[Scope of Durable Object storage]
14-
Note that Durable Object storage is scoped by individual <GlossaryTooltip term="Durable Object">Durable Objects</GlossaryTooltip>.
15-
16-
- An account can have many Durable Object <GlossaryTooltip term="namespace">namespaces</GlossaryTooltip>.
17-
- A namespace can have many Durable Objects.
18-
19-
However, storage is scoped per individual Durable Object.
20-
:::
21-
22-
Durable Objects gain access to a persistent Durable Object Storage API via the `DurableObjectStorage` interface and accessed by the `DurableObjectState::storage` property. This is frequently accessed via `this.ctx.storage` when the `ctx` parameter passed to the Durable Object constructor.
23-
24-
JavaScript is a single-threaded and event-driven programming language. This means that JavaScript runtimes, by default, allow requests to interleave with each other which can lead to concurrency bugs. The Durable Objects runtime uses a combination of <GlossaryTooltip term="input gate">input gates</GlossaryTooltip> and <GlossaryTooltip term="output gate">output gates</GlossaryTooltip> to avoid this type of concurrency bug when performing storage operations.
25-
2611
The `SqlStorage` interface encapsulates methods that modify the SQLite database embedded within a Durable Object. The `SqlStorage` interface is accessible via the `sql` property of `DurableObjectStorage` class.
2712

2813
For example, using `sql.exec()`, a user can create a table, then insert rows into the table.

src/content/docs/durable-objects/api/storage-api.mdx

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
title: Key-Value storage
2+
title: Durable Object storage
33
pcx_content_type: concept
44
sidebar:
5-
order: 7
5+
order: 6
66
---
77

88
import {
@@ -13,6 +13,21 @@ import {
1313
TypeScriptExample,
1414
} from "~/components";
1515

16+
The Durable Object Storage API allows <GlossaryTooltip term="Durable Object">Durable Objects</GlossaryTooltip> to access transactional and strongly consistent storage. A Durable Object's attached storage is private to its unique instance and cannot be accessed by other objects.
17+
18+
:::note[Scope of Durable Object storage]
19+
Note that Durable Object storage is scoped by individual <GlossaryTooltip term="Durable Object">Durable Objects</GlossaryTooltip>.
20+
21+
- An account can have many Durable Object <GlossaryTooltip term="namespace">namespaces</GlossaryTooltip>.
22+
- A namespace can have many Durable Objects.
23+
24+
However, storage is scoped per individual Durable Object.
25+
:::
26+
27+
Durable Objects gain access to a persistent Durable Object Storage API via the `DurableObjectStorage` interface and accessed by the `DurableObjectState::storage` property. This is frequently accessed via `this.ctx.storage` when the `ctx` parameter passed to the Durable Object constructor.
28+
29+
JavaScript is a single-threaded and event-driven programming language. This means that JavaScript runtimes, by default, allow requests to interleave with each other which can lead to concurrency bugs. The Durable Objects runtime uses a combination of <GlossaryTooltip term="input gate">input gates</GlossaryTooltip> and <GlossaryTooltip term="output gate">output gates</GlossaryTooltip> to avoid this type of concurrency bug when performing storage operations.
30+
1631
The following code snippet shows you how to store and retrieve data using the Durable Object Storage API.
1732

1833
<TypeScriptExample>

src/content/docs/durable-objects/features/websockets.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Using WebSockets
2+
title: Use WebSockets
33
pcx_content_type: concept
44
sidebar:
55
order: 5

0 commit comments

Comments
 (0)