Module hdk::link

source ·
Expand description

Links in Holochain are analogous to a join table in a traditional SQL schema.

Links embody navigable graph structures between entires in a more general format than CRUD trees.

At a high level:

  • Can implement direct or indirect circular references
  • Reference data by its hash
  • Have a base and target entry, action or external hash
  • Can either exist or be deleted (i.e. there is no revision history, deleting removes a link permanently)
  • Many links can point from/to the same hash
  • Links reference entry hashes not actions

Links are retrived from the DHT by performing link::get_links or link::get_link_details against the base of a link.

Links also support short (about 500 bytes) binary data to encode contextual data on a domain specific basis.

Links are not entries, there is only an action with no associated entry, so links cannot reference other links or maintain or participate in a revision history.

Traits§

Functions§

  • Create a link from a base hash to a target hash, with an optional tag.
  • Delete a specific link creation record.
  • Get all link creates and deletes that reference a base hash, optionally filtered by type or tag.
  • Returns all links that reference a base hash, optionally filtered by link type and tag.