Skip to content

Conversation

@jsdt
Copy link
Contributor

@jsdt jsdt commented Dec 3, 2025

Description of Changes

This adds a way to build queries within typescript Views.

I'm still waiting for #3685 to go in before I update the bindings to return queries.

For examples and syntax, you can look at the tests in crates/bindings-typescript/tests/query.test.ts.

This still needs some cleanup, and a few places need to have the types tightened:

  1. I need to fix some helpers related to indexed columns (right now semijoins allow the use of any columns).
  2. The current change to the ViewFns allow any query, but we need to restrict the type to match the view return type.

I can also add back functions for things like inequality once we are ok with the rest of it.

API and ABI breaking changes

This adds some new API surface, but does not break existing code.

Expected complexity level and risk

Testing

There are some tests for the sql that gets emitted.

I'll probably rely on manual testing of the typescript views for now.

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.

2 participants