This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-07-19
Channels
- # admin-announcements (2)
- # aws-lambda (3)
- # beginners (66)
- # boot (61)
- # cider (1)
- # cljs-dev (17)
- # clojure (100)
- # clojure-austin (4)
- # clojure-brasil (1)
- # clojure-canada (8)
- # clojure-quebec (6)
- # clojure-russia (48)
- # clojure-sg (6)
- # clojure-spec (37)
- # clojure-uk (61)
- # clojure-ukraine (2)
- # clojurescript (80)
- # core-async (13)
- # cursive (20)
- # datascript (37)
- # datomic (2)
- # defnpodcast (4)
- # emacs (5)
- # funcool (3)
- # hoplon (11)
- # jobs (7)
- # juxt (26)
- # lein-figwheel (48)
- # leiningen (3)
- # luminus (3)
- # om (34)
- # om-next (5)
- # onyx (5)
- # protorepl (6)
- # re-frame (10)
- # reagent (9)
- # rethinkdb (16)
- # ring-swagger (5)
- # spacemacs (14)
- # specter (54)
- # untangled (36)
- # vim (75)
- # yada (1)
Can someone help me make Datomic schemas for use with DataScript? At least for the ones with => Schema for DataScript
(def Name
Str)
(def FundamentalUnit
(enum "K" "s" "bit"
"dollar" "cd" "kg"
"A" "m" "mol"))
(def FundamentalUnits
{(conditional FundamentalUnit
FundamentalUnit
:else (enum "bits" "<<IMAGINARY_UNIT>>" "oz"
"lb" "1000inch"))
Int})
(def Unitless
{})
(def Unit
[Name {:v Num
:u (conditional empty?
Unitless
FundamentalUnits)}])
(def PhysicalQuantity
{:amount pos?
:unit Unit})
(def Transaction
{(enum :production :consumption) PhysicalQuantity
:timestamp DateTime})
=> Schema for DataScript
;; most important piece of data for what I'm working on.
(def TransactionHistory
'(Transaction))
=> Schema for DataScript
(def Dimension
[(conditional empty?
Unitless
FundamentalUnits)
Name])
The units are based on https://github.com/martintrojer/frinj/blob/master/resources/units.edn
I'm studying to understand writing Datomic schemas.