Skip to content
This repository was archived by the owner on Aug 8, 2025. It is now read-only.
Merged
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
13 changes: 12 additions & 1 deletion docs/modules/c-sharp/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,17 @@ public partial struct AcademicPaper {

Any table supports getting an [`Index`](#class-index) using `ctx.Db.{table}.{index}`. For example, `ctx.Db.academic_paper.TitleAndDate` or `ctx.Db.academic_paper.Venue`.

## Indexable Types

SpacetimeDB supports only a restricted set of types as index keys:

- Signed and unsigned integers of various widths.
- `bool`.
- `string`.
- [`Identity`](#struct-identity).
- [`ConnectionId`](#struct-connectionid).
- `enum`s annotated with [`SpacetimeDB.Type`](#attribute-spacetimedbtype).

## Class `Index`

```csharp
Expand Down Expand Up @@ -1391,4 +1402,4 @@ Stored in reducer-scheduling tables as a column.
[`DateTimeOffset`]: https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset?view=net-9.0
[`TimeSpan`]: https://learn.microsoft.com/en-us/dotnet/api/system.timespan?view=net-9.0
[unix epoch]: https://en.wikipedia.org/wiki/Unix_time
[`System.Random`]: https://learn.microsoft.com/en-us/dotnet/api/system.random?view=net-9.0
[`System.Random`]: https://learn.microsoft.com/en-us/dotnet/api/system.random?view=net-9.0