Skip to content

Commit 4a4bb0c

Browse files
docs: Add confirmed reads configuration to SDK reference docs (#4036)
Confirmed reads are arguably something users should be aware of. # Expected complexity level and risk 1 # Testing Documentation update. --------- Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>
1 parent a9892aa commit 4a4bb0c

5 files changed

Lines changed: 709 additions & 1433 deletions

File tree

docs/docs/00200-core-concepts/00600-client-sdk-languages/00500-rust-reference.md

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,16 @@ impl DbConnection {
7878

7979
Construct a `DbConnection` by calling `DbConnection::builder()` and chaining configuration methods, then calling `.build()`. You must at least specify `with_uri`, to supply the URI of the SpacetimeDB to which you published your module, and `with_module_name`, to supply the human-readable SpacetimeDB domain name or the raw `Identity` which identifies the database.
8080

81-
| Name | Description |
82-
| --------------------------------------------------------- | ------------------------------------------------------------------------------------ |
83-
| [`with_uri` method](#method-with_uri) | Set the URI of the SpacetimeDB instance which hosts the remote database. |
84-
| [`with_module_name` method](#method-with_module_name) | Set the name or `Identity` of the remote database. |
85-
| [`on_connect` callback](#callback-on_connect) | Register a callback to run when the connection is successfully established. |
86-
| [`on_connect_error` callback](#callback-on_connect_error) | Register a callback to run if the connection is rejected or the host is unreachable. |
87-
| [`on_disconnect` callback](#callback-on_disconnect) | Register a callback to run when the connection ends. |
88-
| [`with_token` method](#method-with_token) | Supply a token to authenticate with the remote database. |
89-
| [`build` method](#method-build) | Finalize configuration and connect. |
81+
| Name | Description |
82+
| ------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
83+
| [`with_uri` method](#method-with_uri) | Set the URI of the SpacetimeDB instance which hosts the remote database. |
84+
| [`with_module_name` method](#method-with_module_name) | Set the name or `Identity` of the remote database. |
85+
| [`with_confirmed_reads` method](#method-with_confirmed_reads) | Enable or disable confirmed reads. |
86+
| [`on_connect` callback](#callback-on_connect) | Register a callback to run when the connection is successfully established. |
87+
| [`on_connect_error` callback](#callback-on_connect_error) | Register a callback to run if the connection is rejected or the host is unreachable. |
88+
| [`on_disconnect` callback](#callback-on_disconnect) | Register a callback to run when the connection ends. |
89+
| [`with_token` method](#method-with_token) | Supply a token to authenticate with the remote database. |
90+
| [`build` method](#method-build) | Finalize configuration and connect. |
9091

9192
#### Method `with_uri`
9293

@@ -108,6 +109,20 @@ impl DbConnectionBuilder {
108109

109110
Configure the SpacetimeDB domain name or `Identity` of the remote database which identifies it within the SpacetimeDB instance or cluster.
110111

112+
#### Method `with_confirmed_reads`
113+
114+
```rust
115+
impl DbConnectionBuilder {
116+
fn with_confirmed_reads(self, confirmed: bool) -> Self;
117+
}
118+
```
119+
120+
Configure the connection to request confirmed reads.
121+
122+
When enabled, the server will send query results only after they are confirmed to be durable, i.e. persisted to disk on one or more replicas depending on the replication settings of the database. When set to `false`, the server will send results as soon as transactions are committed in memory.
123+
124+
If this method is not called, the server chooses the default.
125+
111126
#### Callback `on_connect`
112127

113128
```rust

docs/docs/00200-core-concepts/00600-client-sdk-languages/00600-csharp-reference.md

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,16 @@ class DbConnection
8181

8282
Construct a `DbConnection` by calling `DbConnection.Builder()`, chaining configuration methods, and finally calling `.Build()`. At a minimum, you must specify `WithUri` to provide the URI of the SpacetimeDB instance, and `WithModuleName` to specify the database's name or identity.
8383

84-
| Name | Description |
85-
| --------------------------------------------------- | ------------------------------------------------------------------------------------ |
86-
| [WithUri method](#method-withuri) | Set the URI of the SpacetimeDB instance hosting the remote database. |
87-
| [WithModuleName method](#method-withmodulename) | Set the name or identity of the remote database. |
88-
| [OnConnect callback](#callback-onconnect) | Register a callback to run when the connection is successfully established. |
89-
| [OnConnectError callback](#callback-onconnecterror) | Register a callback to run if the connection is rejected or the host is unreachable. |
90-
| [OnDisconnect callback](#callback-ondisconnect) | Register a callback to run when the connection ends. |
91-
| [WithToken method](#method-withtoken) | Supply a token to authenticate with the remote database. |
92-
| [Build method](#method-build) | Finalize configuration and open the connection. |
84+
| Name | Description |
85+
| ------------------------------------------------------- | ------------------------------------------------------------------------------------ |
86+
| [WithUri method](#method-withuri) | Set the URI of the SpacetimeDB instance hosting the remote database. |
87+
| [WithModuleName method](#method-withmodulename) | Set the name or identity of the remote database. |
88+
| [WithConfirmedReads method](#method-withconfirmedreads) | Enable or disable confirmed reads. |
89+
| [OnConnect callback](#callback-onconnect) | Register a callback to run when the connection is successfully established. |
90+
| [OnConnectError callback](#callback-onconnecterror) | Register a callback to run if the connection is rejected or the host is unreachable. |
91+
| [OnDisconnect callback](#callback-ondisconnect) | Register a callback to run when the connection ends. |
92+
| [WithToken method](#method-withtoken) | Supply a token to authenticate with the remote database. |
93+
| [Build method](#method-build) | Finalize configuration and open the connection. |
9394

9495
#### Method `WithUri`
9596

@@ -113,6 +114,21 @@ class DbConnectionBuilder
113114

114115
Configure the SpacetimeDB domain name or `Identity` of the remote database which identifies it within the SpacetimeDB instance or cluster.
115116

117+
#### Method `WithConfirmedReads`
118+
119+
```csharp
120+
class DbConnectionBuilder
121+
{
122+
public DbConnectionBuilder<DbConnection> WithConfirmedReads(bool confirmedReads);
123+
}
124+
```
125+
126+
Configure the connection to request confirmed reads.
127+
128+
When enabled, the server will send query results only after they are confirmed to be durable, i.e. persisted to disk on one or more replicas depending on the replication settings of the database. When set to `false`, the server will send results as soon as transactions are committed in memory.
129+
130+
If this method is not called, the server chooses the default.
131+
116132
#### Callback `OnConnect`
117133

118134
```csharp

docs/docs/00200-core-concepts/00600-client-sdk-languages/00700-typescript-reference.md

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -117,15 +117,16 @@ class DbConnection {
117117

118118
Construct a `DbConnection` by calling `DbConnection.builder()` and chaining configuration methods, then calling `.build()`. You must at least specify `withUri`, to supply the URI of the SpacetimeDB to which you published your module, and `withModuleName`, to supply the human-readable SpacetimeDB domain name or the raw `Identity` which identifies the database.
119119

120-
| Name | Description |
121-
| ----------------------------------------------------- | ------------------------------------------------------------------------------------ |
122-
| [`withUri` method](#method-withuri) | Set the URI of the SpacetimeDB instance which hosts the remote database. |
123-
| [`withModuleName` method](#method-withmodulename) | Set the name or `Identity` of the remote database. |
124-
| [`onConnect` callback](#callback-onconnect) | Register a callback to run when the connection is successfully established. |
125-
| [`onConnectError` callback](#callback-onconnecterror) | Register a callback to run if the connection is rejected or the host is unreachable. |
126-
| [`onDisconnect` callback](#callback-ondisconnect) | Register a callback to run when the connection ends. |
127-
| [`withToken` method](#method-withtoken) | Supply a token to authenticate with the remote database. |
128-
| [`build` method](#method-build) | Finalize configuration and connect. |
120+
| Name | Description |
121+
| --------------------------------------------------------- | ------------------------------------------------------------------------------------ |
122+
| [`withUri` method](#method-withuri) | Set the URI of the SpacetimeDB instance which hosts the remote database. |
123+
| [`withModuleName` method](#method-withmodulename) | Set the name or `Identity` of the remote database. |
124+
| [`withConfirmedReads` method](#method-withconfirmedreads) | Enable or disable confirmed reads. |
125+
| [`onConnect` callback](#callback-onconnect) | Register a callback to run when the connection is successfully established. |
126+
| [`onConnectError` callback](#callback-onconnecterror) | Register a callback to run if the connection is rejected or the host is unreachable. |
127+
| [`onDisconnect` callback](#callback-ondisconnect) | Register a callback to run when the connection ends. |
128+
| [`withToken` method](#method-withtoken) | Supply a token to authenticate with the remote database. |
129+
| [`build` method](#method-build) | Finalize configuration and connect. |
129130

130131
#### Method `withUri`
131132

@@ -147,6 +148,20 @@ class DbConnectionBuilder {
147148

148149
Configure the SpacetimeDB domain name or hex string encoded `Identity` of the remote database which identifies it within the SpacetimeDB instance or cluster.
149150

151+
#### Method `withConfirmedReads`
152+
153+
```typescript
154+
class DbConnectionBuilder {
155+
public withConfirmedReads(confirmedReads: bool): DbConnectionBuilder;
156+
}
157+
```
158+
159+
Configure the connection to request confirmed reads.
160+
161+
When enabled, the server will send query results only after they are confirmed to be durable, i.e. persisted to disk on one or more replicas depending on the replication settings of the database. When set to `false`, the server will send results as soon as transactions are committed in memory.
162+
163+
If this method is not called, the server chooses the default.
164+
150165
#### Callback `onConnect`
151166

152167
```typescript

docs/llms/docs-benchmark-details.json

Lines changed: 604 additions & 1374 deletions
Large diffs are not rendered by default.

docs/llms/docs-benchmark-summary.json

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11
{
22
"version": 1,
3-
"generated_at": "2026-01-14T10:50:55.061Z",
3+
"generated_at": "2026-01-15T08:48:04.366Z",
44
"by_language": {
55
"csharp": {
66
"modes": {
77
"docs": {
8-
"hash": "2c474d4cfaa7d4eb9b3ab2e25ec621643985f0258dde661c9c3953e6a1010083",
8+
"hash": "57aa5b6bb986daddf9d3a9f4992cdb0c6bab78257186c00ab1284c1b40281b46",
99
"models": {
1010
"GPT-5": {
1111
"categories": {
1212
"basics": {
1313
"tasks": 12,
14-
"total_tests": 27,
15-
"passed_tests": 27,
16-
"pass_pct": 100.0,
17-
"task_pass_equiv": 12.0,
18-
"task_pass_pct": 100.0
14+
"total_tests": 12,
15+
"passed_tests": 0,
16+
"pass_pct": 0.0,
17+
"task_pass_equiv": 0.0,
18+
"task_pass_pct": 0.0
1919
},
2020
"schema": {
2121
"tasks": 10,
22-
"total_tests": 34,
23-
"passed_tests": 18,
24-
"pass_pct": 52.941177,
25-
"task_pass_equiv": 6.0,
26-
"task_pass_pct": 60.000004
22+
"total_tests": 10,
23+
"passed_tests": 0,
24+
"pass_pct": 0.0,
25+
"task_pass_equiv": 0.0,
26+
"task_pass_pct": 0.0
2727
}
2828
},
2929
"totals": {
3030
"tasks": 22,
31-
"total_tests": 61,
32-
"passed_tests": 45,
33-
"pass_pct": 73.77049,
34-
"task_pass_equiv": 18.0,
35-
"task_pass_pct": 81.818184
31+
"total_tests": 22,
32+
"passed_tests": 0,
33+
"pass_pct": 0.0,
34+
"task_pass_equiv": 0.0,
35+
"task_pass_pct": 0.0
3636
}
3737
}
3838
}
@@ -48,28 +48,28 @@
4848
"categories": {
4949
"basics": {
5050
"tasks": 12,
51-
"total_tests": 27,
52-
"passed_tests": 19,
53-
"pass_pct": 70.37037,
54-
"task_pass_equiv": 8.0,
55-
"task_pass_pct": 66.66667
51+
"total_tests": 12,
52+
"passed_tests": 0,
53+
"pass_pct": 0.0,
54+
"task_pass_equiv": 0.0,
55+
"task_pass_pct": 0.0
5656
},
5757
"schema": {
5858
"tasks": 10,
59-
"total_tests": 34,
60-
"passed_tests": 23,
61-
"pass_pct": 67.64706,
62-
"task_pass_equiv": 6.0,
63-
"task_pass_pct": 60.000004
59+
"total_tests": 10,
60+
"passed_tests": 0,
61+
"pass_pct": 0.0,
62+
"task_pass_equiv": 0.0,
63+
"task_pass_pct": 0.0
6464
}
6565
},
6666
"totals": {
6767
"tasks": 22,
68-
"total_tests": 61,
69-
"passed_tests": 42,
70-
"pass_pct": 68.85246,
71-
"task_pass_equiv": 14.000001,
72-
"task_pass_pct": 63.636368
68+
"total_tests": 22,
69+
"passed_tests": 0,
70+
"pass_pct": 0.0,
71+
"task_pass_equiv": 0.0,
72+
"task_pass_pct": 0.0
7373
}
7474
}
7575
}

0 commit comments

Comments
 (0)