From cd2ae5022dc46bac849fcf5c82f636d705a2b8f8 Mon Sep 17 00:00:00 2001 From: Kris Jenkins Date: Mon, 15 Jun 2026 11:18:04 +0100 Subject: [PATCH] Use non-deprecated databaseIdentity accessor in docs reference tables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The reducer-context cheat-sheet and the "Context Properties Reference" tables still listed `ctx.identity` / `ctx.identity()` as the accessor for the module's own identity. That accessor was deprecated in favour of `databaseIdentity` / `database_identity()` / `DatabaseIdentity`, and the troubleshooting guide added in c70d00246 (#5142) documented the deprecation but missed updating these other references — these stray updates should have landed there. This brings all four language tabs in line with the non-deprecated accessor. # API and ABI breaking changes None. Docs-only change. # Expected complexity level and risk 1 - trivial documentation fix, no code or behaviour change. # Testing - [x] Confirmed accessor names against the SDK source: `database_identity()` (Rust/C++), `databaseIdentity` (TS), `DatabaseIdentity` (C#); the old forms are marked deprecated/obsolete in bindings. --- .../00100-databases/00500-cheat-sheet.md | 8 ++++---- .../00300-reducers/00400-reducer-context.md | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/docs/00200-core-concepts/00100-databases/00500-cheat-sheet.md b/docs/docs/00200-core-concepts/00100-databases/00500-cheat-sheet.md index 4a52f82ac51..764837c8125 100644 --- a/docs/docs/00200-core-concepts/00100-databases/00500-cheat-sheet.md +++ b/docs/docs/00200-core-concepts/00100-databases/00500-cheat-sheet.md @@ -752,7 +752,7 @@ ctx.db // Database access ctx.sender // Identity of caller ctx.connectionId // ConnectionId | undefined ctx.timestamp // Timestamp -ctx.identity // Module's identity +ctx.databaseIdentity // Module's identity ``` @@ -763,7 +763,7 @@ ctx.Db // Database access ctx.Sender // Identity of caller ctx.ConnectionId // ConnectionId? ctx.Timestamp // Timestamp -ctx.Identity // Module's identity +ctx.DatabaseIdentity // Module's identity ctx.Rng // Random number generator ``` @@ -775,7 +775,7 @@ ctx.db // Database access ctx.sender() // Identity of caller ctx.connection_id() // Option ctx.timestamp // Timestamp -ctx.identity() // Module's identity +ctx.database_identity() // Module's identity ctx.rng() // Random number generator ``` @@ -787,7 +787,7 @@ ctx.db // Database access (Table accessor) ctx.sender() // Identity of caller (Identity type) ctx.connection_id // std::optional ctx.timestamp // Timestamp of current transaction (Timestamp type) -ctx.identity() // Module's own identity (Identity type) +ctx.database_identity() // Module's own identity (Identity type) ctx.rng() // Random number generator (for seeded randomness) ``` diff --git a/docs/docs/00200-core-concepts/00200-functions/00300-reducers/00400-reducer-context.md b/docs/docs/00200-core-concepts/00200-functions/00300-reducers/00400-reducer-context.md index ac5374516e5..a4d743813d1 100644 --- a/docs/docs/00200-core-concepts/00200-functions/00300-reducers/00400-reducer-context.md +++ b/docs/docs/00200-core-concepts/00200-functions/00300-reducers/00400-reducer-context.md @@ -400,7 +400,7 @@ SPACETIMEDB_REDUCER(send_reminder, ReducerContext _ctx, ScheduledTask task) { | `ConnectionId` | `ConnectionId?` | Connection ID of the caller, if available | | `Timestamp` | `Timestamp` | Time when the reducer was invoked | | `Rng` | `Random` | Random number generator | -| `Identity` | `Identity` | The module's identity | +| `DatabaseIdentity` | `Identity` | The module's identity | @@ -413,7 +413,7 @@ SPACETIMEDB_REDUCER(send_reminder, ReducerContext _ctx, ScheduledTask task) { **Methods:** -- `identity() -> Identity` - Get the module's identity +- `database_identity() -> Identity` - Get the module's identity - `rng() -> &StdbRng` - Get the random number generator - `random() -> T` - Generate a single random value - `sender_auth() -> &AuthCtx` - Get authorization context for the caller (includes JWT claims and internal call detection) @@ -429,7 +429,7 @@ SPACETIMEDB_REDUCER(send_reminder, ReducerContext _ctx, ScheduledTask task) { **Methods:** -- `identity() -> Identity` - Get the module's identity +- `database_identity() -> Identity` - Get the module's identity - `rng() -> StdbRng&` - Get the random number generator (deterministic and reproducible) - `sender_auth() -> const AuthCtx&` - Get authorization context for the caller (includes JWT claims and internal call detection)