New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
per-method account ids #37
Closed
Closed
Conversation
This file contains 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
Member
rjbs
commented
Oct 19, 2016
- datasets are now accounts
- primary context no longer has a single datasetid/accountid
- Context::WithAccount is generated as needed
- each method call in a request can have an explicit (or implicit) accountid
- there can be multiple kinds of account
+1 |
They are not accessed directly through context, but through Context::WithDataset. Context caches them so they can still be saved at the end of a transaction.
It has to do this because a context no longer has a datasetId to which to defer.
This way, dataset contexts can be established just in time, and an Ix system can support entity types with multiple dataset types as their collections. This does mean, though, that you will not have one entity that can appear in more than one type of collection.
This blows up when you do: my $ctx = acquire_ctx; $ctx = $ctx->with_account(...); ...which is useful in testing. The thing that should be weak is the cache from root to leaf.
we do not use handles because we want to use $ctx_with_acct as the invocant so that it is what gets passed into the method calls!
merged |
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.