Liking cljdoc? Tell your friends :D

io.github.bsless/datalog-parser.spec

1-1 translation of datalog query spec based on the official Datomic documentation

NOTE: Legacy spec not implemented

Exists as a reference implementation for other parsers.

Usage

(require '[bsless.datalog-parser.spec :as spec]
         '[clojure.spec.alpha :as s])

(s/conform
 ::spec/query
 '[:find ?track-name ?minutes
   :in $ ?artist-name
   :where [?artist :artist/name ?artist-name]
   [?track :track/artists ?artist]
   [?track :track/duration ?millis]
   [(quot ?millis 60000) ?minutes]
   [?track :track/name ?track-name]])

License

Copyright © 2022 Ben Sless

Distributed under the Eclipse Public License version 1.0.

Can you improve this documentation?Edit on GitHub

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

× close