This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-07-09
Channels
- # admin-announcements (1)
- # beginners (1)
- # boot (16)
- # capetown (2)
- # cider (1)
- # clara (1)
- # cljs-dev (2)
- # cljsrn (2)
- # clojure-brasil (3)
- # clojure-czech (2)
- # clojure-greece (4)
- # clojure-quebec (2)
- # clojure-russia (3)
- # clojure-spec (8)
- # clojure-sweden (1)
- # clojure-uk (1)
- # clojurescript (8)
- # datomic (12)
- # editors (12)
- # events (1)
- # hoplon (11)
- # off-topic (2)
- # om (56)
- # proton (2)
- # reagent (2)
- # spacemacs (1)
@lvh regarding your first question I would need an example
I mean with attribute definitions and specific questions you want to ask
@marshall: Hmm, I tried that but seems I got caught in a bit of a gotya. I was trying to do the ‘and’ logic on the child entity being referenced by the cardinality many ref, which does not work.
Works:
(db/q
'[:find [(pull ?e [*]) ...]
:in $ ?one ?two
:where
[?e :template/field ?one]
[?e :template/field ?two]]
db [:template.field/id 102] [:template.field/id 101])
Doesn’t work:
(db/q
'[:find [(pull ?e [*]) ...]
:in $ ?one ?two
:where
[?e :template/field ?field]
[?f :template.field/id ?one]
[?f :template.field/id ?two]]
db 102 101)
Works too:
(db/q
'[:find [(pull ?e [*]) ...]
:in $ ?one ?two
:where
[?f1 :template.field/id ?one]
[?f2 :template.field/id ?two]
[?e :template/field ?f1]
[?e :template/field ?f2]
]
db 102 101)
I guess I see the logic now, in that the second one only sees one template.field at a time and then asks it to be both ?one and ?two.
val_waeselynck: More detail then what I provided in https://clojurians.slack.com/archives/datomic/p1468014473000883 ? I’m trying to translate Swagger into datomic
I am trying to turn this: https://gist.github.com/lvh/b45dc7994336b4171d78622af81f7e52 into datomic so I can query it. petstore-minimal.json specifies the generally accepted and returned mime types here: https://gist.github.com/lvh/b45dc7994336b4171d78622af81f7e52#file-petstore-minimal-json-L20-L25 but also overrides it for a specific operation here: https://gist.github.com/lvh/b45dc7994336b4171d78622af81f7e52#file-petstore-minimal-json-L30-L32
according to the spec, which unfortunately doesn’t have anchor links for a specific part (http://swagger.io/specification/) the operation one overrides the global one