Skip to content
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
wants to merge 12 commits into from
Closed

per-method account ids #37

wants to merge 12 commits into from

Conversation

rjbs
Copy link
Member

@rjbs 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

@wolfsage
Copy link
Contributor

+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!
@rjbs
Copy link
Member Author

rjbs commented Oct 24, 2016

merged

@rjbs rjbs closed this Oct 24, 2016
@rjbs rjbs deleted the dataset-mk2 branch August 22, 2021 18:15
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.

None yet

2 participants