Skip to content

Small doc fixes potpourri #198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Mar 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions docs/http/index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# SpacetimeDB HTTP Authorization

Rather than a password, each Spacetime identity is associated with a private token. These tokens are generated by SpacetimeDB when the corresponding identity is created, and cannot be changed.

> Do not share your SpacetimeDB token with anyone, ever.

### Generating identities and tokens

SpacetimeDB can derive an identity from the `sub` and `iss` claims of any [OpenID Connect](https://openid.net/developers/how-connect-works/) compliant [JSON Web Token](https://jwt.io/).
Expand Down
9 changes: 5 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,15 @@ public static void World(ReducerContext ctx)
```
:::

:::server-rust
While SpacetimeDB doesn't support nested transactions,
a reducer can [schedule another reducer] to run at an interval,
a reducer can [schedule another reducer](https://docs.rs/spacetimedb/latest/spacetimedb/attr.reducer.html#scheduled-reducers) to run at an interval,
or at a specific time.
:::server-rust
[schedule another reducer]: /docs/modules/rust#defining-scheduler-tables
:::
:::server-csharp
[schedule another reducer]: /docs/modules/c-sharp#scheduler-tables
While SpacetimeDB doesn't support nested transactions,
a reducer can [schedule another reducer](/docs/modules/c-sharp#scheduler-tables) to run at an interval,
or at a specific time.
:::

### Client
Expand Down
2 changes: 0 additions & 2 deletions docs/modules/c-sharp/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ Each table is defined as a C# `class` annotated with `[SpacetimeDB.Table]`, wher
By default, tables are **private**. This means that they are only readable by the table owner, and by server module code.
The `[SpacetimeDB.Table(Public = true))]` annotation makes a table public. **Public** tables are readable by all users, but can still only be modified by your server module code.

_Coming soon: We plan to add much more robust access controls than just public or private tables. Stay tuned!_

A reducer is a function which traverses and updates the database. Each reducer call runs in its own transaction, and its updates to the database are only committed if the reducer returns successfully. In C#, reducers are defined as functions annotated with `[SpacetimeDB.Reducer]`. If an exception is thrown, the reducer call fails, the database is not updated, and a failed message is reported to the client.

## Install SpacetimeDB
Expand Down
9 changes: 0 additions & 9 deletions docs/modules/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,3 @@ We have C# support available in experimental status. C# can be a good choice for

- [C# Module Reference](/docs/modules/c-sharp)
- [C# Module Quickstart Guide](/docs/modules/c-sharp/quickstart)

### Coming Soon

We have plans to support additional languages in the future.

- Python
- Typescript
- C++
- Lua
2 changes: 0 additions & 2 deletions docs/modules/rust/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ Each table is defined as a Rust struct annotated with `#[table(name = table_name
By default, tables are **private**. This means that they are only readable by the table owner, and by server module code.
The `#[table(name = table_name, public)]` macro makes a table public. **Public** tables are readable by all users but can still only be modified by your server module code.

_Coming soon: We plan to add much more robust access controls than just public or private. Stay tuned!_

A reducer is a function that traverses and updates the database. Each reducer call runs in its own transaction, and its updates to the database are only committed if the reducer returns successfully. In Rust, reducers are defined as functions annotated with `#[reducer]`, and may return a `Result<()>`, with an `Err` return aborting the transaction.

## Install SpacetimeDB
Expand Down
26 changes: 13 additions & 13 deletions docs/nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,27 @@ const nav = {
page('C# Reference', 'modules/c-sharp', 'modules/c-sharp/index.md'),
section('Client SDK Languages'),
page('Overview', 'sdks', 'sdks/index.md'),
page('Typescript Quickstart', 'sdks/typescript/quickstart', 'sdks/typescript/quickstart.md'),
page('Typescript Reference', 'sdks/typescript', 'sdks/typescript/index.md'),
page('Rust Quickstart', 'sdks/rust/quickstart', 'sdks/rust/quickstart.md'),
page('Rust Reference', 'sdks/rust', 'sdks/rust/index.md'),
page('C# Quickstart', 'sdks/c-sharp/quickstart', 'sdks/c-sharp/quickstart.md'),
page('C# Reference', 'sdks/c-sharp', 'sdks/c-sharp/index.md'),
page('Rust Quickstart', 'sdks/rust/quickstart', 'sdks/rust/quickstart.md'),
page('Rust Reference', 'sdks/rust', 'sdks/rust/index.md'),
page('TypeScript Quickstart', 'sdks/typescript/quickstart', 'sdks/typescript/quickstart.md'),
page('TypeScript Reference', 'sdks/typescript', 'sdks/typescript/index.md'),
section('SQL'),
page('SQL Reference', 'sql', 'sql/index.md'),
section('Subscriptions'),
page('Subscription Reference', 'subscriptions', 'subscriptions/index.md'),
section('How To'),
page('Incremental Migrations', 'how-to/incremental-migrations', 'how-to/incremental-migrations.md'),
section('WebAssembly ABI'),
page('Module ABI Reference', 'webassembly-abi', 'webassembly-abi/index.md'),
section('HTTP API'),
page('HTTP', 'http', 'http/index.md'),
page('`/identity`', 'http/identity', 'http/identity.md'),
page('`/database`', 'http/database', 'http/database.md'),
section('Data Format'),
page('SATS-JSON', 'sats-json', 'sats-json.md'),
page('BSATN', 'bsatn', 'bsatn.md'),
section('SQL'),
page('SQL Reference', 'sql', 'sql/index.md'),
section('Subscriptions'),
page('Subscription Reference', 'subscriptions', 'subscriptions/index.md'),
section('Internals'),
page('Module ABI Reference', 'webassembly-abi', 'webassembly-abi/index.md'),
page('SATS-JSON Data Format', 'sats-json', 'sats-json.md'),
page('BSATN Data Format', 'bsatn', 'bsatn.md'),
section('Appendix'),
page('Appendix', 'appendix', 'appendix.md'),
],
};
Expand Down
38 changes: 19 additions & 19 deletions nav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,41 +65,41 @@ const nav: Nav = {

section('Client SDK Languages'),
page('Overview', 'sdks', 'sdks/index.md'),
page(
'Typescript Quickstart',
'sdks/typescript/quickstart',
'sdks/typescript/quickstart.md'
),
page('Typescript Reference', 'sdks/typescript', 'sdks/typescript/index.md'),
page('Rust Quickstart', 'sdks/rust/quickstart', 'sdks/rust/quickstart.md'),
page('Rust Reference', 'sdks/rust', 'sdks/rust/index.md'),
page(
'C# Quickstart',
'sdks/c-sharp/quickstart',
'sdks/c-sharp/quickstart.md'
),
page('C# Reference', 'sdks/c-sharp', 'sdks/c-sharp/index.md'),
page('Rust Quickstart', 'sdks/rust/quickstart', 'sdks/rust/quickstart.md'),
page('Rust Reference', 'sdks/rust', 'sdks/rust/index.md'),
page(
'TypeScript Quickstart',
'sdks/typescript/quickstart',
'sdks/typescript/quickstart.md'
),
page('TypeScript Reference', 'sdks/typescript', 'sdks/typescript/index.md'),

section('SQL'),
page('SQL Reference', 'sql', 'sql/index.md'),

section('Subscriptions'),
page('Subscription Reference', 'subscriptions', 'subscriptions/index.md'),

section('How To'),
page('Incremental Migrations', 'how-to/incremental-migrations', 'how-to/incremental-migrations.md'),

section('WebAssembly ABI'),
page('Module ABI Reference', 'webassembly-abi', 'webassembly-abi/index.md'),

section('HTTP API'),
page('HTTP', 'http', 'http/index.md'),
page('`/identity`', 'http/identity', 'http/identity.md'),
page('`/database`', 'http/database', 'http/database.md'),

section('Data Format'),
page('SATS-JSON', 'sats-json', 'sats-json.md'),
page('BSATN', 'bsatn', 'bsatn.md'),

section('SQL'),
page('SQL Reference', 'sql', 'sql/index.md'),
section('Internals'),
page('Module ABI Reference', 'webassembly-abi', 'webassembly-abi/index.md'),
page('SATS-JSON Data Format', 'sats-json', 'sats-json.md'),
page('BSATN Data Format', 'bsatn', 'bsatn.md'),

section('Subscriptions'),
page('Subscription Reference', 'subscriptions', 'subscriptions/index.md'),
section('Appendix'),
page('Appendix', 'appendix', 'appendix.md'),
],
};
Expand Down