Skip to content

Conversation

@Shubham8287
Copy link
Contributor

@Shubham8287 Shubham8287 commented Dec 1, 2025

Description of Changes

Implements a query builder for rust modules according to the spec.

Look at the tests in query_builder.rs.

TODO: Extend return type for views to include Query and update the #[table] macro to generate query builder bindings.

API and ABI breaking changes

This is an additive change. Current modules do not need to be updated unless they wish to use the query builder.

Expected complexity level and risk

1.5, Will appreciate comments to better structure code.

Testing

[x]: unit tests.

I have also done type safety checks manually from module.

@Shubham8287 Shubham8287 marked this pull request as draft December 1, 2025 15:49
@Shubham8287 Shubham8287 marked this pull request as ready for review December 2, 2025 20:25
@Shubham8287
Copy link
Contributor Author

Changes since last review:

  1. Added Timestamp, Bytes as literals.
  2. Renamed Expr<T> to BoolExpr<T> and ValueExpr<T> to Operand<T>.
  3. fix conflicting macro changes and using pair of struct identifier and table name to implement traits.
  4. Some minor naming corrections as per suggestion.

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.

End to end tests will be added in a separate patch that updates the #[view] return type and generates the query builder bindings.

@joshua-spacetime joshua-spacetime linked an issue Dec 3, 2025 that may be closed by this pull request
@joshua-spacetime joshua-spacetime changed the title Query builder rust [Rust] Module-side query builder Dec 3, 2025
@joshua-spacetime joshua-spacetime changed the title [Rust] Module-side query builder [Rust] Module-side query builder types Dec 3, 2025
@Shubham8287 Shubham8287 enabled auto-merge December 4, 2025 06:05
@Shubham8287 Shubham8287 added this pull request to the merge queue Dec 4, 2025
Merged via the queue into master with commit 51ec052 Dec 4, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Rust] Module bindings for query builder

3 participants