Commit Graph

30 Commits

Author SHA1 Message Date
Phoebe Goldman 44d7b76d29 Fix defining multiple tables on the same struct in Rust modules (#2103) 2025-01-10 01:58:20 +00:00
Phoebe Goldman a4b46c5ddb Implement the identity host call and ctx.identity() in Rust (#2085) 2025-01-03 19:09:34 +00:00
Noa 4015237f6a Tweak scheduled_at macro syntax (#2054) 2025-01-02 18:26:44 +00:00
Noa 94c66c97da Don't autogen schedule fields (#1894)
Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>
2024-11-22 18:39:39 +00:00
Phoebe Goldman 437eed7760 Rust modules: Revise BTreeIndexBounds (#1815) 2024-10-22 14:49:32 +00:00
Tyler Cloutier 0eb147e132 Implemented TypeScript SDK proposal codegen (#1776) 2024-10-02 06:24:58 +00:00
Noa 53758420ec Rust module API rework (#1660) 2024-09-27 20:09:36 +00:00
Tyler Cloutier 3530498b88 Switched table names to singular (#1684)
Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>
2024-09-11 11:11:51 -04:00
Noa 8daab8e20f Impl macro rework (#1314) 2024-09-09 23:30:31 +00:00
james gilles 747eb71830 Make ScheduleAt special + Typespace::is_valid_for_client_code_generation (#1590) 2024-08-22 17:05:04 +00:00
Kim Altintop 4ffeff792b Remove support for the update reducer (#1557) 2024-07-31 06:26:06 +00:00
james gilles f81f2a7492 Move db module from spacetimedb_sats to spacetimedb_lib (#1479) 2024-07-17 20:59:44 +00:00
Shubham Mishra 276387d2b3 Timer Table Implementation (#1449)
Co-authored-by: Ingvar Stepanyan <me@rreverser.com>
2024-07-16 08:38:56 +00:00
Ingvar Stepanyan 4b7eff66da Generate tagged enums in C# client code (#1421) 2024-06-13 16:32:46 +00:00
Mazdak Farrokhzad 5e47b61f8a Tables only become public explicitly via #[spacetimedb(table(public))] (#1278)
* make user tables private by default and define privacy via attribute

* switch to spacetimedb(table(public)) syntax

* accept codegen snap changes

* sdk: use public in define_tables!

* bindings-macro: adjust some doc comments

* sdk-test-connect-disconnect: make Connected/Disconnected public tables

* Make Public Private again
2024-06-03 11:22:58 +00:00
Mazdak Farrokhzad 8f85da598c Remove #[spacetimedb(reducer, repeat = _)] support (#1095) 2024-04-22 09:58:39 +00:00
Noa 7d3bdc308b Prune deps from bindings dependency tree (#1014) 2024-04-03 01:54:36 +00:00
Phoebe Goldman 3a31c33e81 Add delete_by_{nonunique_column} method to #[spacetimedb(table)] (#859)
- Refactor `bindings::query::delete_by_field` to require `FilterableValue`
  and return `u32` count of deleted rows.
- Add `bindings::query::delete_by_unique_field`
  with the previous behavior of `delete_by_field`,
  i.e. requiring `UniqueValue` and returning `bool` with `true = deleted`.
  This is implemented in terms of `delete_by_field`.
- Macro-generated unique filter funcs call `delete_by_unique_field`
  rather than `delete_by_field`.
- The table macro now generates non-unique delete functions
  alongside the existing non-unique filter functions
  for non-unique fields with primitive types.
- Add uses of `::delete_by_{field}` for both unique and non-unique columns
  to the `rust-wasm-test` module.

Note that this PR does not include any host-side changes;
the diff is localized to the `bindings` and `bindings-macro` crates.
2024-02-16 18:42:05 +00:00
Noa 37658aae7e Add rust-version to Cargo.toml (#802)
* Add rust-version to Cargo.toml

* Use workspace inheritance to make bumping the spacetime version easier
2024-02-07 20:02:05 +00:00
Mario Montoya f3a5dc2228 Move 'constraints' markers to primitive and fix incompatibility with deploy (#561)
* Move 'constraints' markers to primitive and fix 'Multiple primary columns defined for table'

* Fix integration test

* Merge
2023-11-15 11:26:35 -05:00
Mario Montoya 321da54db7 Add integration test for the query macro (#538) 2023-11-13 11:30:48 -08:00
Tyler Cloutier 8ba8dba598 Added multi column index usage to the rust-wasm-test module (#500)
Added multi column index usage to the rust-wasm-test module

This also updates integration test.

The number of lines in the output changes as there is 1 additional
line corresponding to the new table.
2023-11-07 16:59:17 +00:00
Mazdak Farrokhzad cba518d90e Use newtypes ColId, TableId, IndexId, SequenceId everywhere (*) (#408)
* Use newtypes ColId, TableId, IndexId, SequenceId everywhere (*)

* Addressing some PR comments

---------

Co-authored-by: Mario Alejandro Montoya Cortés <mamcx@elmalabarista.com>
2023-10-19 11:18:50 -05:00
Mario Montoya 80a0a29704 Move cargo deps to the workspace (#172)
* Moving deps to workspace

* Merge
2023-08-11 15:24:31 -07:00
Phoebe Goldman 3e215322e5 [Modules] spacetimedb(index) macro now uses more consistent parens. (#97)
Prior to this comment, the `#[spacetimedb(index)]` attribute accepted its arguments like:

```rust
\#[spacetimedb(index(btree), name = "NAME", FIELD_NAMES...)]
```

Putting the `NAME` and `FIELD_NAMES` arguments outside of the
inner parens was uninutitive. With this commit, the syntax is changed to:

```rust

\#[spacetimedb(index(btree, name = "NAME", FIELD_NAMES...))]
```
2023-08-01 23:17:03 +02:00
Mario Montoya c154e3a6df Private tables (#17)
* Initial bootstrap for private tables

* Separate Access (private, public) for kind o table (system, user)

* Validates the access to private tables

* Check auth for drop table
2023-08-01 23:17:02 +02:00
Mazdak Farrokhzad b2e4d371e8 CLI: Improves errors for call + misc refactoring (#45)
* cli: refactor + improve call errors

* cli: improve call errors

* cli: simplify tasks

* misc improvements

* cargo fmt + clippy
2023-08-01 23:17:02 +02:00
Mazdak Farrokhzad 39dbc381e2 rename the APIs (#41) 2023-08-01 23:17:02 +02:00
Mazdak Farrokhzad 5cfafd3da7 make API call errors convertible to String (#27) 2023-08-01 23:17:02 +02:00
Tyler Cloutier 44df6c6e7d Initial commit 2023-08-01 23:16:37 +02:00