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

adds upsert_entities #1481

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

adds upsert_entities #1481

wants to merge 2 commits into from

Conversation

a0js
Copy link

@a0js a0js commented Feb 18, 2025

Description of changes

Adds upsert_entities to the Entities implementation. Internally, it removes any entities that match the uid and performs an add.

Issue #1479

Checklist for requesting a review

The change in this PR is (choose one, and delete the other options):

  • A backwards-compatible change requiring a minor version bump to cedar-policy (e.g., addition of a new API).

I confirm that this PR (choose one, and delete the other options):

  • Updates the "Unreleased" section of the CHANGELOG with a description of my change (required for major/minor version bumps).

I confirm that cedar-spec (choose one, and delete the other options):

  • Does not require updates because my change does not impact the Cedar formal model or DRT infrastructure.

I confirm that docs.cedarpolicy.com (choose one, and delete the other options):

  • Does not require updates because my change does not impact the Cedar language specification.

@a0js
Copy link
Author

a0js commented Feb 18, 2025

This still requires iterating through all entities per updated entity in remove_entities which may not be the best alternative. I'm just not sure where to add an update capability.

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.

1 participant