Liking cljdoc? Tell your friends :D

net.eraserhead.clara-eql.core


defrulecljmacro

(defrule rule-name & body)

Define a Clara rule to tally an eql query

For example:

(defrule sample-rule "Find results such as {:foo/uuid ... :foo/bar {:bar/name "aname"}}" :query [:foo/uuid {:foo/bar [:bar/name]}] :from ?eid :where [EAV (= e ?eid) (= a :foo/uuid)])

Results are insert in QueryResult facts with the following fields:

query - A fully-qualified symbol naming the query (e.g. sample-ns/sample-rule) root - The root from which the result was pulled (the values of ?eid above) result - The resulting query data.

Define a Clara rule to tally an eql query

For example:

  (defrule sample-rule
    "Find results such as {:foo/uuid ... :foo/bar {:bar/name \"aname\"}}"
    :query [:foo/uuid {:foo/bar [:bar/name]}]
    :from ?eid
    :where
    [EAV (= e ?eid) (= a :foo/uuid)])

Results are insert in QueryResult facts with the following fields:

  query  - A fully-qualified symbol naming the query (e.g. sample-ns/sample-rule)
  root   - The root from which the result was pulled (the values of ?eid above)
  result - The resulting query data.
sourceraw docstring

remove-nil-valuesclj

(remove-nil-values result)
source

single-attribute-query-resultsclj

source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close