docs: Datalog tutorial series — 11 sections, Corestore storyline (closes #234)#237
Merged
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds examples/tutorial_udfs.rs demonstrating register_predicate (valid-promo? filter) and register_aggregate (delivery-score float ratio) with verified output matching the Section 10 wiki page. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
4826bcb to
d7aff20
Compare
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
demos/tutorial_corestore_setup.txt— the shared base dataset (Corestore e-commerce catalog: 3 categories, 8 products, 3 customers) that all 11 tutorial sections build onexamples/tutorial_udfs.rs— a standalone Rust example demonstratingregister_predicateandregister_aggregate(Section 10, UDF-only features that cannot be shown in the REPL)Wiki pages published:
Tutorial-Setup— prerequisites, dataset, cumulative tx_count tableTutorial-01throughTutorial-11— basic queries → bi-temporal → recursion → negation → aggregates → expressions → prepared queries → disjunction → UDFs → marketplaceHome.md— "Tutorials" section added before "Pages"Learning-Resources.md— tutorial series listed as primary Minigraf Datalog resourceGrammar coverage
All constructs from
Datalog-Reference.mdare demonstrated:transact,retract,rule,query,:find(variables, aggregates, window exprs),:where(pattern, expr, not, not-join, or, or-join, and-branch, rule-invocation),:as-of,:valid-at,:any-valid-time,:with, scalar aggregates, window functions,:partition-by,:order-by,:desc, comparison/arithmetic/string/type predicates,$bind-slotprepared queries,register_predicateUDF,register_aggregateUDF.Test plan
cargo run --example tutorial_udfsproduces the expected predicate + aggregate + window outputcargo run < demos/tutorial_corestore_setup.txtloads 3 transacts cleanly (tx_count = 3)🤖 Generated with Claude Code