Languages Patterns Calendar About Lists Join



datascript is a query language created in 2014. Immutable database and Datalog query engine for Clojure, ClojureScript and JS

#484on PLDB 8Years Old 5.6kUsers

Example code from the web:

(require '[datascript.core :as d]) ;; Implicit join, multi-valued attribute (let [schema {:aka {:db/cardinality :db.cardinality/many}} conn (d/create-conn schema)] (d/transact! conn [ { :db/id -1 :name "Maksim" :age 45 :aka ["Max Otto von Stierlitz", "Jack Ryan"] } ]) (d/q '[ :find ?n ?a :where [?e :aka "Max Otto von Stierlitz"] [?e :name ?n] [?e :age ?a] ] @conn)) ;; => #{ ["Maksim" 45] } ;; Destructuring, function call, predicate call, query over collection

Article source

PLDB - Build the next great programming language. v5.0.0 - Email ยท Github