Repository navigation
Fix Pull chapter: wildcard example, join-vs-pull, cardinality-many gotcha - #48
Merged
Merged
Conversation
…tcha The wildcard example pulled Charizard, who has no :evolution/next, even though the following paragraph described what a wildcard returns for a Pokemon that evolves. Switched it to Pikachu so the reader actually sees the reference. Added a section showing the more important semantic difference between join and pull: a join silently drops entities missing an attribute, while pull keeps them with the key simply absent. Also noted that pull always returns a cardinality-many attribute as a vector, even when the entity has only one value. Closes #30 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Summary
:evolution/next, even though the surrounding text described what a wildcard returns for a Pokemon that evolves. Switched the example to Pikachu.:pokemon/category), while pull keeps all 151 with the key simply absent. Also introduces the[(pull ?e [...]) ...]collection-find form as the usual real-world pattern.:pokemon/type) as a vector, even when the entity has only one value, in the scalar pull example.All claims verified by running the actual queries against the site's
app.core/run-q(not assumed from docs).Closes #30
Test plan
clojure -X:testpasses (32 tests, 498 assertions)app.core/run-qand confirmed the printed results match the prose🤖 Generated with Claude Code