Skip to content

Fix Pull chapter: wildcard example, join-vs-pull, cardinality-many gotcha - #48

Merged
thiagooak merged 1 commit into
mainfrom
worktree-agent-af97d663bcb20373f
Sep 21, 2026
Merged

thiagooak merged 1 commit into
mainfrom
worktree-agent-af97d663bcb20373f

Conversation

@thiagooak

Copy link
Copy Markdown
Owner

Summary

  • The wildcard pull example pulled Charizard, who has no :evolution/next, even though the surrounding text described what a wildcard returns for a Pokemon that evolves. Switched the example to Pikachu.
  • Added a "Pull keeps entities that a join would drop" section: a join silently drops entities missing an attribute (verified: only 4 Pokemon have :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.
  • Noted that pull always returns a cardinality-many attribute (: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:test passes (32 tests, 498 assertions)
  • Manually ran every query in the diff via app.core/run-q and confirmed the printed results match the prose

🤖 Generated with Claude Code

…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>
@thiagooak
thiagooak merged commit 226b05c into main Sep 21, 2026
2 checks passed
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.

COR-17: Pull: wildcard example doesn't show what the text describes; a key pull-vs-join difference is missing

1 participant