Skip to content

Conversation

@mamcx
Copy link
Contributor

@mamcx mamcx commented Jul 3, 2023

Description of Changes

Add the ability to “send me everything” query.

It use the special

SELECT * FROM *

to trigger this.

This semantically doesn't seem right, or at least confusing from the POV of subscriptions: It means "send back what you have right now" instead of "keep streaming back all the changes".

This means this will break (ie changes to the database schema could fail in subsequent runs):

subscribe SELECT * FROM *
CREATE TABLE a
INSERT INTO a
DROP TABLE a
CREATE TABLE b

API

  • This is a breaking change to the module API
  • This is a breaking change to the ClientAPI

If the API is breaking, please state below what will break

cloutiertyler and others added 30 commits June 18, 2023 22:19
* test

* Fixed CI

* Fixed tests

* Fixed formatting

* Fixed test error by removing chrono default features

* Rename smoketests CI thing

* Hopefully fix the testing issue

* Fix typos

* Fixed install git-hooks

* Fixed formatting

* Fixed compile error

* fixed testing issues
Signed-off-by: Tyler Cloutier <[email protected]>
* Clippy runs on default module

* Fix clippy issue with default module

---------

Co-authored-by: Boppy <[email protected]>
* I think somehow we are adding all tables as orphans, added log

* Removed unneeded clone

---------

Co-authored-by: Boppy <[email protected]>
)

* Fix bug for subcription that was not executing or returning if empty

* Clippy

* Filter out deleted rows

* Recover the op_type (DELETED, INSERTED) flag for the row in the subscription
* grandfathered docs improvements in bindings

* improve bindings

* address review comments

* remove late bound lifetime

* undo derive for Timestamp to bisect bug
* Forbid unsupported syntax in SELECT (like ORDER BY) & improve accuracy of sql test suite

* Update crates/sqltest/src/main.rs

Co-authored-by: Mazdak Farrokhzad <[email protected]>
Signed-off-by: Mario Montoya <[email protected]>

---------

Signed-off-by: Mario Montoya <[email protected]>
Co-authored-by: Mazdak Farrokhzad <[email protected]>
* Working on improving commands that use identities

* Fix lints

* Reverted file that shouldn't have changed

* Found and fixed all other todos

* Addressed more CLI TODOs

* Fixes for formatting issues

* Set names of identities

* Set name of identities + clippy

* Small fix

* Added the start of a doc comment, switching over to another PR

* Fixed tests that needed to be updated

* Addressed more feedback and fixed several clippy issues

* Small fix

* Apply suggestions from code review

Co-authored-by: Mazdak Farrokhzad <[email protected]>
Signed-off-by: John Detter <[email protected]>

* Added more doc comments

* Addressing more feedback

* Fixed really old bug in SpacetimeDB

* Tests to verify new functionality

* Fix clippy lints

* Email during identity creation is optional

* Fix output so testsuite passes

---------

Signed-off-by: John Detter <[email protected]>
Co-authored-by: Boppy <[email protected]>
Co-authored-by: Mazdak Farrokhzad <[email protected]>
* Some work

* Getting smoketests working on mac

* All tests are passing except known failing tests

---------

Co-authored-by: Boppy <[email protected]>
…urn wether or not reducer has subscribers; Moved all ReducerEvent and ReducerArgs code into a single file (#10)

Co-authored-by: Steve <[email protected]>
* Changed C# reducer signature; Change reducer invocation method to return wether or not reducer has subscribers; Moved all ReducerEvent and ReducerArgs code into a single file

* Formatting, tests

* Clippy

* Removed union from C# codegen

* Tests

* Update crates/cli/src/subcommands/generate/csharp.rs

Co-authored-by: Tyler Cloutier <[email protected]>
Signed-off-by: John Detter <[email protected]>

* Removed duplicate code

* Lint

* Clippy

* CLIPPY

* Generating custom indexes for unique / primary keys

---------

Signed-off-by: John Detter <[email protected]>
Co-authored-by: Steve <[email protected]>
Co-authored-by: John Detter <[email protected]>
Co-authored-by: Tyler Cloutier <[email protected]>
* Fix incomplete transaction bug

* Clippy
tokio runtimes cannot be nested, so we only create one if no ambient
context can be found and pass around a runtime handle for spawning
tasks.
* integrate jdetter's review

* address phoebe's comments

* improve errnos naming
Prior to this commit, callbacks in the Rust client SDK shared access to the global
ClientCache while running asynchronously. This meant that a long-running or delayed
callback could observe the ClientCache in a state later than the one that caused the
callback's invocation, and had no way to access the specific state for which it was
invoked.

With this commit, each `Invoke` message to the callback worker includes an
`Arc<ClientCache>` snapshot of the DB state when that callback was invoked. The callback
worker stores that state in a `thread_local`, and methods that inspect
tables (e.g. `TableType::iter`) read the state out of the `thread_local` when it is
present. This allows callbacks to observe exactly the state which caused their invocation,
never a later state, while maintaining the C#-like API where `ClientCache` access is based
on free functions or static trait methods.

---------

Co-authored-by: John Detter <[email protected]>
* Fix bug and added a test

* Test updates

* Fix tests

---------

Co-authored-by: Boppy <[email protected]>
cloutiertyler and others added 12 commits July 29, 2023 17:37
spacetimedb.com/spacetimedb

Co-authored-by: Boppy <[email protected]>
This commit renames the first argument to connect from host to spacetimedb_uri. It's not just a host(name), it's the URI of the SpacetimeDB instance.
* Fix bug in locating fields when a JOIN clause is present

* Update crates/lib/src/relation.rs

Co-authored-by: Mazdak Farrokhzad <[email protected]>
Signed-off-by: Mario Montoya <[email protected]>

* Update crates/lib/src/relation.rs

Co-authored-by: Mazdak Farrokhzad <[email protected]>
Signed-off-by: Mario Montoya <[email protected]>

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

Co-authored-by: Mazdak Farrokhzad <[email protected]>
Signed-off-by: Mario Montoya <[email protected]>

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

Co-authored-by: Mazdak Farrokhzad <[email protected]>
Signed-off-by: Mario Montoya <[email protected]>

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

Co-authored-by: Mazdak Farrokhzad <[email protected]>
Signed-off-by: Mario Montoya <[email protected]>

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

Co-authored-by: Mazdak Farrokhzad <[email protected]>
Signed-off-by: Mario Montoya <[email protected]>

* Small doc nits

* Fix test

---------

Signed-off-by: Mario Montoya <[email protected]>
Co-authored-by: Mazdak Farrokhzad <[email protected]>
This commit adds the `quickstart-chat` Rust module and client to the appropriate examples dirs.
mamcx and others added 2 commits July 31, 2023 14:41
@cloutiertyler cloutiertyler force-pushed the master branch 3 times, most recently from 1ec98b1 to d3fd5ce Compare August 1, 2023 21:10
auto-merge was automatically disabled August 1, 2023 21:12

Pull request was closed

@cloutiertyler cloutiertyler deleted the mamcx/send_all branch August 2, 2023 23:11
bfops added a commit that referenced this pull request Jul 16, 2025
* Lint script

* modernize: pnpm & prettier (#51)

* Push

* Push

* Run prettier

* Prettier stuff

* modernize: Remove Husky & pre-commit (#53)

* modernize: tsup (#54)

* Push

* jest

* modernize: jest to vitest (#55)

* modernize: pnpm workspace (#56)

* Monorepo

* Readme

* Move tsconfig

* Fix test

* modernize: CRA -> Vite apps (#57)

* Quickstart

* test app too

* Run pnpm

* Remove eslint files

* Format

* modernize: ES2017 classes (#58)

* modernize: in-house EventEmitter (#64)

* Push

* Undo min change

* modernize: undici for WebSocket in Node (#59)

* Use undici, remove other unneeded dependencies

* pnpm install

* Bundle everything

* Move everything to devDependency

* headers object

* Bump version to 0.11.0

* Push

* Hmm not working still

* Add undici to peerDependencies

* Measure size

* Push

* Fix formatting

* Working on node!!

---------

Co-authored-by: Zeke Foppa <github.com/bfops>
Co-authored-by: Zeke Foppa <[email protected]>

* modernize: Single output (#68)

* modernize: quickstart, move server into client (#69)

* Push

* Run pnpm install

* modernize: Engines field (#70)

* modernize: Continuous Releases (#71)

* Add pkg.pr.new

* Fix directory

* modernize: Changesets;provenance (#72)

* Push

* Push

* pnpm install

* Any update

* modernize: Split lint and test GH actions (#73)

* Push

* Forgot to rename

* We only care about Lint at commit level

* modernize: pkg.pr.new compact mode (#75)

* modernize: tweak prettier configuration (#74)

* docs: Undici as peerDependency

* modernize: webpackIgnore undici (#77)

* Push

* Webpackignore

* modernize: Conditional browser build (#79)

* Push

* Remove webpackIgnore

* fix: Remove obsolete comment

* modernize: isolatedDeclarations;de-cyclic imports (#81)

* Push

* Fix test

---------

Co-authored-by: Zeke Foppa <[email protected]>
bfops added a commit that referenced this pull request Jul 17, 2025
* [bfops/docs]: C# fix

* [bfops/docs]: empty

---------

Co-authored-by: Zeke Foppa <github.com/bfops>
bfops pushed a commit that referenced this pull request Jul 17, 2025
* One-off query support (#49)

* SpacetimeDBURI argument in place of host and ssl enabled bool (#52)

* SpacetimeDBURI argument in place of host and ssl enabled bool

* Small cleanup

---------

Co-authored-by: John Detter <[email protected]>

* Add support for client address; re-run `spacetime generate` for quickstart client (#54)

* README.md and License.txt updates (#53)

* Update README.md

* Add license.txt

* Rename

* Add LICENSE.txt with proper case

---------

Co-authored-by: Derek Brinkmann <[email protected]>

* Add support for client address; re-run `spacetime generate` for quickstart client

Re: #299

---------

Co-authored-by: dbrinkmanncw <[email protected]>
Co-authored-by: Derek Brinkmann <[email protected]>

* Making Quickstart Work Again (#57)

* Packaged nuget package, quickstart is now working again

* Reset DBNAME

---------

Co-authored-by: John Detter <[email protected]>

* OnUnhandledReducerError (#31)

Co-authored-by: Steve <[email protected]>
Co-authored-by: Boppy <[email protected]>

---------

Co-authored-by: james gilles <[email protected]>
Co-authored-by: dbrinkmanncw <[email protected]>
Co-authored-by: John Detter <[email protected]>
Co-authored-by: Phoebe Goldman <[email protected]>
Co-authored-by: Derek Brinkmann <[email protected]>
Co-authored-by: SteveBoytsun <[email protected]>
Co-authored-by: Steve <[email protected]>
bfops pushed a commit that referenced this pull request Jul 17, 2025
…start client (#54)

* README.md and License.txt updates (#53)

* Update README.md

* Add license.txt

* Rename

* Add LICENSE.txt with proper case

---------

Co-authored-by: Derek Brinkmann <[email protected]>

* Add support for client address; re-run `spacetime generate` for quickstart client

Re: #299

---------

Co-authored-by: dbrinkmanncw <[email protected]>
Co-authored-by: Derek Brinkmann <[email protected]>
bfops added a commit that referenced this pull request Aug 7, 2025
* Lint script

* modernize: pnpm & prettier (#51)

* Push

* Push

* Run prettier

* Prettier stuff

* modernize: Remove Husky & pre-commit (#53)

* modernize: tsup (#54)

* Push

* jest

* modernize: jest to vitest (#55)

* modernize: pnpm workspace (#56)

* Monorepo

* Readme

* Move tsconfig

* Fix test

* modernize: CRA -> Vite apps (#57)

* Quickstart

* test app too

* Run pnpm

* Remove eslint files

* Format

* modernize: ES2017 classes (#58)

* modernize: in-house EventEmitter (#64)

* Push

* Undo min change

* modernize: undici for WebSocket in Node (#59)

* Use undici, remove other unneeded dependencies

* pnpm install

* Bundle everything

* Move everything to devDependency

* headers object

* Bump version to 0.11.0

* Push

* Hmm not working still

* Add undici to peerDependencies

* Measure size

* Push

* Fix formatting

* Working on node!!

---------

Co-authored-by: Zeke Foppa <github.com/bfops>
Co-authored-by: Zeke Foppa <[email protected]>

* modernize: Single output (#68)

* modernize: quickstart, move server into client (#69)

* Push

* Run pnpm install

* modernize: Engines field (#70)

* modernize: Continuous Releases (#71)

* Add pkg.pr.new

* Fix directory

* modernize: Changesets;provenance (#72)

* Push

* Push

* pnpm install

* Any update

* modernize: Split lint and test GH actions (#73)

* Push

* Forgot to rename

* We only care about Lint at commit level

* modernize: pkg.pr.new compact mode (#75)

* modernize: tweak prettier configuration (#74)

* docs: Undici as peerDependency

* modernize: webpackIgnore undici (#77)

* Push

* Webpackignore

* modernize: Conditional browser build (#79)

* Push

* Remove webpackIgnore

* fix: Remove obsolete comment

* modernize: isolatedDeclarations;de-cyclic imports (#81)

* Push

* Fix test

---------

Co-authored-by: Zeke Foppa <[email protected]>
bfops pushed a commit that referenced this pull request Aug 7, 2025
* One-off query support (#49)

* SpacetimeDBURI argument in place of host and ssl enabled bool (#52)

* SpacetimeDBURI argument in place of host and ssl enabled bool

* Small cleanup

---------

Co-authored-by: John Detter <[email protected]>

* Add support for client address; re-run `spacetime generate` for quickstart client (#54)

* README.md and License.txt updates (#53)

* Update README.md

* Add license.txt

* Rename

* Add LICENSE.txt with proper case

---------

Co-authored-by: Derek Brinkmann <[email protected]>

* Add support for client address; re-run `spacetime generate` for quickstart client

Re: #299

---------

Co-authored-by: dbrinkmanncw <[email protected]>
Co-authored-by: Derek Brinkmann <[email protected]>

* Making Quickstart Work Again (#57)

* Packaged nuget package, quickstart is now working again

* Reset DBNAME

---------

Co-authored-by: John Detter <[email protected]>

* OnUnhandledReducerError (#31)

Co-authored-by: Steve <[email protected]>
Co-authored-by: Boppy <[email protected]>

---------

Co-authored-by: james gilles <[email protected]>
Co-authored-by: dbrinkmanncw <[email protected]>
Co-authored-by: John Detter <[email protected]>
Co-authored-by: Phoebe Goldman <[email protected]>
Co-authored-by: Derek Brinkmann <[email protected]>
Co-authored-by: SteveBoytsun <[email protected]>
Co-authored-by: Steve <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.