Skip to content

Instantly share code, notes, and snippets.

View stuarthalloway's full-sized avatar

Stuart Halloway stuarthalloway

View GitHub Profile
@stuarthalloway
stuarthalloway / gist:3068749
Created July 8, 2012 00:29 — forked from cs224/gist:3066392
datomic-clojure-relational-algebra-2012-07-07
;; Datomic example code
;; Demonstrates using datalog with Clojure defrecords
(use '[datomic.api :only [q db] :as d])
;;; http://www.lshift.net/blog/2010/08/21/some-relational-algebra-with-datatypes-in-clojure-12
(defrecord Supplier [number name status city])
(defrecord Part [number name colour weight city])
(defrecord Shipment [supplier part quantity])
;; sample data