Context API

The Context API is how Datomic-driven tables and forms are implemented.
  • It tracks Datomic metadata (schema, parsed query, result)
  • "cursor" into resultset as we traverse and navigate
  • Understands hyperlinks and fiddle datamodel
The public APIs you care about:
  • hyperfiddle.api/eav – return the current eav triple which identifies where we are focused
  • hyperfiddle.api/data – return the currently focused result subtree identified by eav
APIs you only care about in advanced custom renderers (e.g. with links):
  • hyperfiddle.api/row-key – compute an identifier of a row in a result to use as an index. Handles :db.cardinality/many, FindRel vs FindColl, :db.unique/identity vs :db/ident vs :db/id, etc.
  • hypercrud.browser.context/row – Given a rowkey, lookup the row