Commit Graph

37 Commits

Author SHA1 Message Date
Mario Montoya 82d5a4f6c0 Implement SpacetimeType for Result<T, E> (#3790)
# Description of Changes

Closes #3673 

*NOTE*: C++ part will be in another PR

# Expected complexity level and risk

2

Adding a new type touch everywhere

# Testing

- [x] Adding smoke and unit test

---------

Signed-off-by: Ryan <r.ekhoff@clockworklabs.io>
Co-authored-by: rekhoff <r.ekhoff@clockworklabs.io>
Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>
Co-authored-by: Jason Larabie <jason@clockworklabs.io>
2026-01-08 15:50:18 +00:00
Mario Montoya 8fb0bcf922 Add UUID built-in convenience type to SpacetimeDB (#3538)
# Description of Changes

Closes
[#3290](https://github.com/clockworklabs/SpacetimeDB/issues/3290).

Adds a new "special" type to SATS, `UUID`, which is represented as the
product `{ __uuid__: u128 }`. Adds versions of this type to all of our
various languages' module bindings libraries and client SDKs, and
updates codegen to recognize it and output references to those named
library types. Adds methods for creating new UUIDs according to the V4
(all random) and V7 (timestamp, monotonic counter and random)
specifications.

# API and ABI breaking changes

We add a new type 

# Expected complexity level and risk

2

it impacts all over the code

# Testing

- [x] Extends the Rust and Unreal SDK tests, and the associated
`module-test` modules in Rust, C# and TypeScript, with uses of UUIDs.
- [x] Extends the C# SDK regression tests with uses of UUIDs.
- [x] Extends the TypeScript test suite with tests with uses of UUIDs.

---------

Signed-off-by: Mario Montoya <mamcx@elmalabarista.com>
Co-authored-by: Phoebe Goldman <phoebe@clockworklabs.io>
Co-authored-by: Jason Larabie <jason@clockworklabs.io>
Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>
2026-01-02 17:17:24 +00:00
Jason Larabie 87de672bb3 Fix C# module bindings codegen for namespaces with view dispatcher (#3668)
# Description of Changes

Closes: #3658 
With the work on Views we ran into trouble with the Return Type and
certain C# code layout where the types are defined inside the Module
class. This fixes the bug in our current approach but needs
consideration to possibly be changed entirely.

# API and ABI breaking changes

N/A

# Expected complexity level and risk

1 - Minor change

# Testing

- [x] Retested with the linked code with and without the namespace
- [x] Re-ran regression tests

---------

Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>
Co-authored-by: joshua-spacetime <josh@clockworklabs.io>
Co-authored-by: rekhoff <r.ekhoff@clockworklabs.io>
2025-11-19 23:32:21 +00:00
Zeke Foppa b9d30991f1 Fix remaining LICENSE files (#3193)
# Description of Changes

Apparently, I missed several license files in #3002. I'm not sure what
method I was using to find them, but apparently it was insufficient.

**This replaces all empty `LICENSE` files with an explicit (symlink to)
BSL license, and all apache licenses with symlinks to the root apache
license.** This PR does not intentionally change any license terms, so
if you see one that changed, **it's a mistake**.

# API and ABI breaking changes

None

# Expected complexity level and risk

1

# Testing

```bash
$ find . -name '*LICENSE*' -type f | grep -v '\.meta$'
./crates/sqltest/standards/LICENSE # this one is an external library that we are not allowed to re-license
./LICENSE.txt # this is the root license
```

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-08-22 19:36:47 +00:00
Mazdak Farrokhzad c39f7fa64c Plain enums as index keys with specialized indices (#2506) 2025-04-09 18:52:15 +00:00
joshua-spacetime aac7894aac Feature gate [ClientVisibilityFilter] in C# (#2556) 2025-04-08 20:42:00 +00:00
joshua-spacetime ec30c0b048 Add rls to the subscription api (#2546) 2025-04-04 21:12:39 +00:00
Mario Montoya 4ade692700 Update formatting of timestamps and identities in PsqlFormatter (#2486) 2025-04-02 16:53:27 +00:00
james gilles 13dfb03135 Add [ClientVisibilityFilter] to csharp module library (#2481) 2025-03-28 19:03:13 +00:00
joshua-spacetime 25abdd5857 fix: bag semantics for joins (#2398) 2025-03-11 18:33:07 +00:00
Mario Montoya 04fd294627 Add missing LICENSE (#2319) 2025-02-28 14:32:59 +00:00
Mazdak Farrokhzad b34caf8306 Rust SDK: Deduplicate rows accross queries (#2286)
Signed-off-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Phoebe Goldman <phoebe@clockworklabs.io>
2025-02-21 21:12:29 +00:00
Mario Montoya 32e24b4095 Add README.md to all modules in SpacetimeDB/modules describing their usage (#2282) 2025-02-19 17:03:34 +00:00
Phoebe Goldman aedc601145 Rename Address to ConnectionId (#2220)
Signed-off-by: Phoebe Goldman <phoebe@goldman-tribe.org>
Co-authored-by: James Gilles <jameshgilles@gmail.com>
Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
2025-02-10 00:40:16 +00:00
Phoebe Goldman 91327d585e Make Timestamp a special SATS type (#1836)
Signed-off-by: Phoebe Goldman <phoebe@goldman-tribe.org>
Co-authored-by: James Gilles <jameshgilles@gmail.com>
Co-authored-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
2025-02-07 18:17:53 +00:00
Ingvar Stepanyan 972d775840 Fix & test row deletion API (#2146)
Co-authored-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
2025-01-23 00:53:15 +00:00
Ingvar Stepanyan 79a9c712f0 Implement new C# index syntax (#2078) 2025-01-07 20:58:17 +00:00
Ingvar Stepanyan 08a3f3210b Migrate C# ModuleDef to V9 (#1670) 2024-12-16 21:49:42 +00:00
james gilles b9b36d5de1 Fix declaration order of ScheduleAt in C# (#2007)
Co-authored-by: Tyler Cloutier <cloutiertyler@aol.com>
2024-12-10 05:07:48 +00:00
Jeremie Pelletier 02b70d5c94 c# client generate (#1707) 2024-10-04 04:12:15 +00:00
Ingvar Stepanyan 5ee077e6d9 [C#] [Reducers] Implement new context fields, enum-based kinds, validation (#1729) 2024-10-01 16:30:32 +00:00
Jeremie Pelletier 32349062ec Jeremie/cs module (#1719) 2024-09-27 11:23:50 +00:00
Ingvar Stepanyan 9f6239991b [C#] [NFC] Reuse attribute classes from runtime (#1718) 2024-09-23 16:47:30 +00:00
Ingvar Stepanyan 2cccac4e14 C# module benchmarks (#1679) 2024-09-06 18:08:14 +00:00
Mazdak Farrokhzad 1dd1e633f3 WASM ABI: implement row_iter_bsatn_advance & row_iter_bsatn_close (#1622) 2024-08-27 22:01:06 +00:00
Ingvar Stepanyan 01d4ed163f Fix [iu](128|256) BSATN implementations in C# (#1582) 2024-08-13 14:07:53 +00:00
Mazdak Farrokhzad 1e8e18d74b Add support for I256 and U256 (#1477) 2024-08-08 18:40:35 +00:00
Noa 10b151b999 Protobufectomy: server (#1077)
Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>
Co-authored-by: Jeremie Pelletier <jeremiep@gmail.com>
2024-07-12 18:02:18 +00:00
Ingvar Stepanyan 6f0f20bf7a Restructure C# SpacetimeDB runtime (#1455) 2024-07-12 17:12:21 +00:00
Ingvar Stepanyan e73ea7932c Add Option SDK tests (#1405) 2024-06-12 21:16:08 +00:00
Ingvar Stepanyan cb2fbb9c4e [C#] Add Roslyn shapshot tests (#1399) 2024-06-11 19:04:16 +00:00
Ingvar Stepanyan d11c83e53c Add explicit parameter for table visibility (#1359) 2024-06-10 13:38:38 +00:00
Piotr Sarnacki d08e9845a4 Always send TransactionUpdate to the sender (#1111)
* Always send TransactionUpdate to the sender

This commit changes transaction update broadcast to always send an
update to the sender, even if the sender is not subscribed to any
data that was committed. In such case the transaction update is sent
with an empty database update.

* Remove debug printlns

* Update code after rebase

* Fix test

* Update crates/core/src/subscription/module_subscription_manager.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Signed-off-by: Piotr Sarnacki <drogus@gmail.com>

* Extract sending message with error handing in module_subscription_manager

* Bring back a new line

* SDK test that the client is notified of a reducer it called

* cleanup subscription code a bit

* Fix merge problem

* Lint + fmt

* Fix test

---------

Signed-off-by: Piotr Sarnacki <drogus@gmail.com>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>
2024-05-16 12:35:03 +00:00
Ingvar Stepanyan 125ca70959 Switch to a better API for tagged enums for C# (#1177)
With C# records - which are available since C# 9, so covers Unity requirements as well - we can use subclassing and pattern matching to get sum types that look a lot more like Rust tagged enums.

This is a breaking change but IMO worth it for the better API going forward.
2024-05-10 22:05:18 +00:00
Ingvar Stepanyan fe44011e4f C#: rename DbEventArgs to ReducerContext (#1191)
* C#: rename DbEventArgs to ReducerContext

This is no longer an event type, so remove subclassing and rename to match the Rust API.

* Update ReducerContext argument name
2024-05-08 14:00:32 +00:00
Ingvar Stepanyan 02d0428151 C#: add experimental NativeAOT-LLVM support (#713)
* Add experimental NativeAOT-LLVM support

* Fix codegen ambiguity

* Restore logging redirect
2024-04-03 18:23:39 +00:00
Ingvar Stepanyan 79b2d04210 C# SDK tests (#706)
* Add C# SDK tests

* Add memoization

* Increase timeout

* Mark module_bindings as LF

* Regenerate from Rust again

* Sort tables & reducers for determinism

* cargo fmt

* Lint & fmt fixups

* Lint fixups

* Allow dirs ending in .wasm
2024-01-16 18:09:43 +00:00