Commit Graph

17 Commits

Author SHA1 Message Date
joshua-spacetime 0de8910e2a Atomic view update (#3624)
# Description of Changes

Updates views atomically on commit, but before downgrading to a
read-only transaction for subscription evaluation.

What this patch does:
1. Renames `ViewId` to `ViewFnPtr`
2. Renames `ViewDatabaseId` to `ViewId`
3. Removes the `module_rx` module watcher from the subscription manager
4. Refactors read sets to only track table scans (index key tracking
will be added later)
5. Drops read sets and removes rows from `st_view_sub` when dropping a
view in an auto-migrate
6. Re-evaluates and updates views (`call_views_with_tx`) from
`call_reducer_with_tx` for any view whose read set overlaps with the
reducer's write set
7. Does the same for sql dml

# API and ABI breaking changes

None

# Expected complexity level and risk

3

It's a bit of a messy diff.

# Testing

- [x] Integrate with
https://github.com/clockworklabs/SpacetimeDB/pull/3616

---------

Signed-off-by: joshua-spacetime <josh@clockworklabs.io>
Co-authored-by: Shubham Mishra <shivam828787@gmail.com>
2025-11-11 04:26:52 +00:00
joshua-spacetime 1874b0e8a2 Generate client bindings for views (#3564)
# Description of Changes

Specifically generate client table handles for views.

# API and ABI breaking changes

None

# Expected complexity level and risk

1

# Testing

Added a `#[view]` to `module-test` and generated new client snapshots
2025-11-04 21:22:25 +00:00
Mazdak Farrokhzad 50d58a2858 Add modules/benchmarks-ts (#3408)
# Description of Changes

Adds `modules/benchmarks-ts`.

# API and ABI breaking changes

None

# Expected complexity level and risk

2?

# Testing

This is a test.

---------

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>
Co-authored-by: Noa <coolreader18@gmail.com>
2025-10-24 16:34:13 +00:00
Noa bb43213245 Typescript module API (#3327)
# Description of Changes

Currently based on #3361 

Implements most of the TS module API (not yet a function for type
aliases).

# Expected complexity level and risk

<!--
How complicated do you think these changes are? Grade on a scale from 1
to 5,
where 1 is a trivial change, and 5 is a deep-reaching and complex
change.

This complexity rating applies not only to the complexity apparent in
the diff,
but also to its interactions with existing and future code.

If you answered more than a 2, explain what is complex about the PR,
and what other components it interacts with in potentially concerning
ways. -->

# Testing

<!-- Describe any testing you've done, and any testing you'd like your
reviewers to do,
so that you're confident that all the changes work as expected! -->

- [x] Extremely basic module stuff works
- [ ] <!-- maybe a test you want a reviewer to do, so they can check it
off when they're satisfied. -->

---------

Signed-off-by: Noa <coolreader18@gmail.com>
Co-authored-by: Tyler Cloutier <cloutiertyler@aol.com>
Co-authored-by: = <cloutiertyler@gmail.com>
Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-10-16 14:58:50 +00:00
Phoebe Goldman 57ec34c626 Wrap some tests in a mod so that I can --skip them (#3284)
# Description of Changes

In environments without dotnet installed, these tests were the only
thing preventing `cargo test --all -- --skip csharp` from completing
successfully.

I also included `rust` in the name, though running tests in an
environment without cargo/rustc installed seems less likely to work.

Extracted from #3263 at request of @Centril .

# API and ABI breaking changes

N/a

# Expected complexity level and risk

1

# Testing

N/a
2025-09-24 16:00:53 +00:00
Noa c5f1d8d0dd Use spacetimedb-standalone to get schema for spacetime generate (#2644) 2025-05-07 21:56:53 +00:00
Noa 020d64c1f1 Split client codegen out into its own crate (#2593)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-04-29 17:54:25 +00:00
james gilles 13dfb03135 Add [ClientVisibilityFilter] to csharp module library (#2481) 2025-03-28 19:03:13 +00:00
Tyler Cloutier e54a28584a Standardized module names and added module-test-cs based on module-test (#2232) 2025-02-09 05:58:19 +00:00
Ingvar Stepanyan 08a3f3210b Migrate C# ModuleDef to V9 (#1670) 2024-12-16 21:49:42 +00:00
james gilles c657b4f088 Rip useless names out of RawDef (#1918) 2024-11-20 21:02:00 +00:00
Ingvar Stepanyan 0935b7346b Fix Find() with struct-based rows (#1917) 2024-10-29 21:33:59 +00:00
Noa 53758420ec Rust module API rework (#1660) 2024-09-27 20:09:36 +00:00
james gilles c32f297c47 Update TableSchema & system tables to resemble ABI V9 (#1697) 2024-09-25 20:03:22 +00:00
Noa f6bc6dcfe5 Switch Rust codegen to use new ModuleDef (#1675) 2024-09-17 18:32:35 +00:00
james gilles 2be42156b2 Allow converting new ModuleDef to old TableSchema (#1630) 2024-08-29 18:17:29 +00:00
james gilles 98faf7d4e1 Add backwards-compatible validation for RawModuleDefV8. (#1606) 2024-08-29 10:10:53 +00:00