Skip to content

docs: Datalog tutorial series — 11 sections, Corestore storyline (closes #234)#237

Merged
adityamukho merged 10 commits into
mainfrom
feature/tutorial-series-234
May 15, 2026
Merged

docs: Datalog tutorial series — 11 sections, Corestore storyline (closes #234)#237
adityamukho merged 10 commits into
mainfrom
feature/tutorial-series-234

Conversation

@adityamukho

Copy link
Copy Markdown
Collaborator

Summary

  • Adds 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 on
  • Adds examples/tutorial_udfs.rs — a standalone Rust example demonstrating register_predicate and register_aggregate (Section 10, UDF-only features that cannot be shown in the REPL)
  • Delivers 12 wiki pages (setup + 11 sections) covering every Minigraf Datalog grammar construct, driven by a real-world e-commerce storyline (Corestore, with characters Alice/Ben/Clara)

Wiki pages published:

  • Tutorial-Setup — prerequisites, dataset, cumulative tx_count table
  • Tutorial-01 through Tutorial-11 — basic queries → bi-temporal → recursion → negation → aggregates → expressions → prepared queries → disjunction → UDFs → marketplace
  • Home.md — "Tutorials" section added before "Pages"
  • Learning-Resources.md — tutorial series listed as primary Minigraf Datalog resource

Grammar coverage

All constructs from Datalog-Reference.md are 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-slot prepared queries, register_predicate UDF, register_aggregate UDF.

Test plan

  • cargo run --example tutorial_udfs produces the expected predicate + aggregate + window output
  • cargo run < demos/tutorial_corestore_setup.txt loads 3 transacts cleanly (tx_count = 3)
  • All 795 existing tests continue to pass (verified by pre-push hook above)
  • Wiki pages render correctly on https://github.com/project-minigraf/minigraf/wiki

🤖 Generated with Claude Code

adityamukho and others added 4 commits May 14, 2026 08:38
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

codecov Bot commented May 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@adityamukho adityamukho force-pushed the feature/tutorial-series-234 branch from 4826bcb to d7aff20 Compare May 14, 2026 12:49
@adityamukho adityamukho linked an issue May 15, 2026 that may be closed by this pull request
@adityamukho adityamukho merged commit 2f156f0 into main May 15, 2026
36 checks passed
@adityamukho adityamukho deleted the feature/tutorial-series-234 branch May 15, 2026 04:24
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.

[FEATURE] Datalog query language tutorials

1 participant