Skip to content
RichMorin edited this page Dec 30, 2012 · 3 revisions

Welcome to the Datomic Cookbook wiki!

This wiki is a Work In Progress; see the main page for its goals and [Pages] for a list of topics. This cookbook covers Datomic usage, in general. For Codeq-specific recipes, see codeq-cookbook.

Query Examples

Each example page (eg, rx_get-entity-extent) documents a Datomic query or rule, eg:

  • Problem - brief description of a problem (ie, use case)
  • Solution - example code and explanatory notes
  • Discussion - comments, notes, warnings, etc.
  • See Also - related pages in the wiki and elsewhere

The example code is carefully formatted and commented in an attempt to make it easy and (if possible) pleasant to read and comprehend, eg:

  • Every function has a docstring (documentation string).
  • Names (eg, symbols) are short, but carefully chosen.
  • Indentation clarifies the structure of the query.
  • In-line spacing presents query clauses in tabular form.
  • Comments on clauses provide a plausible "storyline".
  • Blank lines delimit sections and provide "breathing room".
Clone this wiki locally