Add primary key support for procedural views to rust and ts modules#5111
Draft
joshua-spacetime wants to merge 1 commit into
Draft
Add primary key support for procedural views to rust and ts modules#5111joshua-spacetime wants to merge 1 commit into
joshua-spacetime wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Changes
Adds support for primary keys to procedural views in rust and typescript modules. Now clients can receive update events when subscribed to such views.
Note, care must be taken to ensure that the view never returns duplicate primary keys, or else it will fail which will currently result in the transaction that triggered the view refresh to be rolled back. Better error handling for this exact scenario will be added in a separate follow up patch.
TODO: Currently in draft because it needs to be cleaned up a bit, and I may decide to split the typescript changes into their own PR.
API and ABI breaking changes
None, although adding a primary key to an existing view will require a client update.
Expected complexity level and risk
3
Testing
Compile-time failure scenarios:
SDK tests:
OnUpdateOnUpdateis sender-scopedSmoketests: