Skip to content

Conversation

@jsdt
Copy link
Contributor

@jsdt jsdt commented Jan 13, 2026

Description of Changes

This moves the query builder code out of the server package and into lib so it can be shared by the client and server.

I put the query builder in the index.ts of module bindings as a query object that can be imported. The typescript test-app has an example of using it with the subscription builder.

This is branched off of https://github.com/clockworklabs/SpacetimeDB/pull/3980.

API and ABI breaking changes

This extends the client subscription builder API to allow string | RowTypedQuery<any, any>, so existing client code should be fine.

Expected complexity level and risk

1.5. This is low risk.

Testing

I manually tested that the test app still works locally.

@joshua-spacetime joshua-spacetime linked an issue Jan 14, 2026 that may be closed by this pull request
Copy link
Collaborator

@joshua-spacetime joshua-spacetime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have tests for the typescript sdk that we could potentially extend to exercise the query builder?

on: (
left: IndexedRowExpr<TableDef>,
right: IndexedRowExpr<RightTable>
) => EqExpr<TableDef | RightTable>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still too permissive, right? Is it possible to restrict it?

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.

[TS] Client bindings for query builder

3 participants