Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bsless/datalog-parser.malli
Datomic Datalog parser in Clojure with malli
https://github.com/bsless/datalog-parser.malli
Last synced: 3 months ago
JSON representation
Datomic Datalog parser in Clojure with malli
- Host: GitHub
- URL: https://github.com/bsless/datalog-parser.malli
- Owner: bsless
- License: epl-1.0
- Created: 2022-09-24T09:32:09.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-09-24T09:43:16.000Z (over 2 years ago)
- Last Synced: 2024-07-27T20:08:48.888Z (6 months ago)
- Language: Clojure
- Size: 15.6 KB
- Stars: 13
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Clojars Project](https://img.shields.io/clojars/v/io.github.bsless/datalog-parser.malli.svg)](https://clojars.org/io.github.bsless/datalog-parser.malli)
# io.github.bsless/datalog-parser.malli
1-1 translation of datalog query spec based on the official Datomic
documentation implemented in metosin/malli.- [Query](https://docs.datomic.com/on-prem/query/query.html)
- [Pull](https://docs.datomic.com/on-prem/query/pull.html)NOTE: Legacy spec not implemented
Uses
[io.github.bsless/datalog-parser.spec](https://github.com/bsless/datalog-parser.spec)
as a reference implementation## Usage
```clojure
(require '[bsless.datalog-parser.malli :refer [parse]])(parse
'[: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.