Rete.Network.Node.Query (Rete v0.7.0)

Copy Markdown View Source

A terminal node for a query. Holds the tokens that reached it, to be read back by name.

:params is the head of the query. These are the bindings that key its tokens, and they are the only way to read it. Rete.Engine.query/3 takes exactly these, so a read is one map lookup. An empty list is a query with no parameters. Its tokens all key on %{}, and they come back in arrival order.

Summary

Types

t()

@type t() :: %Rete.Network.Node.Query{
  bind: [atom()],
  hash: integer(),
  id: non_neg_integer() | nil,
  module: module(),
  name: atom(),
  params: [atom()],
  rhs: fun()
}