-
Couldn't load subscription status.
- Fork 118
feat: support writing domain metadata (2/2) #1275
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
Changes from 1 commit
7897691
27f59c6
eae4394
535d242
9ade4c7
a7aefc0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -277,6 +277,20 @@ impl Transaction { | |
| self | ||
| } | ||
|
|
||
| /// Remove domain metadata from the Delta log. | ||
| /// This creates a tombstone to logically delete the specified domain. We don't check | ||
|
||
| /// if the domain metadata exists in the log, the remove action is simply a tombstone record. | ||
| /// Note that each domain can only appear once per transaction. That is, multiple operations | ||
| /// on the same domain are disallowed in a single transaction, as well as setting and removing | ||
| /// the same domain in a single transaction. If a duplicate domain is included, the `commit` will | ||
| /// fail (that is, we don't eagerly check domain validity here). | ||
| /// Removing metadata for multiple distinct domains is allowed. | ||
| pub fn with_domain_metadata_removed(mut self, domain: String) -> Self { | ||
| self.domain_metadatas | ||
| .push(DomainMetadata::remove(domain.clone())); | ||
MannDP marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| self | ||
| } | ||
|
|
||
| /// Generate domain metadata actions with validation. Handle both user and system domains. | ||
| fn generate_domain_metadata_actions<'a>( | ||
| &'a self, | ||
|
|
||
MannDP marked this conversation as resolved.
Show resolved
Hide resolved
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like
removeis a somewhat misleading name for a method that is actually a constructor. I don't have a strong opinion here, but maybe something likenew_tombstonecommunicates the function's intent more clearly?