WIP v7 Feature/cache (don't merge, not ready)#50
Open
theronic wants to merge 6 commits into
Open
Conversation
…ect->resource & resource->subject
… entities. I initially avoided this because it pollutes `(d/touch (d/entity db eid))` for user entities, but it avoids additional Relationships entities and solves the composite tuple nil problem (which could also be solved using v6 data structures). Relationship now returns a vector of txes, not just one entity, which complicates fixtures a bit. Retracting relationships currently broken (should remove the tuples). May offer performance improvements by avoiding the additional entities & hops. Tuples also smaller. Some super-user related tests currently failing. Suspect bug in arrow traversal. Also spotted a bug: we're only fetching the first matching Relation, but it's possible to have multiple Relations on the same resource type & relation name, but with different subjects. The fixtures don't contain any, so that needs to be fixed (see issue #47).
The v7 Relationship tuples were encoding both resource-type and subject-type, but these are redundant since they can be inferred from the Relation reference. Changes: - Schema: Simplified tuple structures from 4 elements to 2: - Forward: [relation-eid, resource-eid] (was [subject-type, relation-eid, resource-type, resource-eid]) - Reverse: [relation-eid, subject-eid] (was [resource-type, relation-eid, subject-type, subject-eid]) - Renamed attributes for clarity: - :eacl.v7.relationship/subject-type+relation+resource-type+resource -> :eacl.v7.relationship/relation+resource - :eacl.v7.relationship/resource-type+relation+subject-type+subject -> :eacl.v7.relationship/relation+subject - Updated tuple creation in tx-relationship to use simplified structure - Updated all tuple destructuring in graph traversal functions - Removed redundant type comparisons in drop-while/take-while predicates This reduces storage overhead and simplifies the tuple structure while maintaining all functionality through the Relation reference. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…use it). this branch is almost certainly broken
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.
No description provided.