This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-11-02
Channels
- # aleph (6)
- # beginners (37)
- # boot (415)
- # cider (17)
- # cljs-dev (79)
- # cljsjs (3)
- # cljsrn (18)
- # clojars (3)
- # clojure (34)
- # clojure-france (6)
- # clojure-italy (1)
- # clojure-korea (1)
- # clojure-russia (22)
- # clojure-spec (64)
- # clojure-uk (47)
- # clojurebridge (6)
- # clojurescript (61)
- # clojurex (1)
- # cloverage (11)
- # component (6)
- # cursive (73)
- # data-science (6)
- # datascript (4)
- # datomic (38)
- # editors (1)
- # emacs (4)
- # events (16)
- # funcool (5)
- # garden (3)
- # hoplon (17)
- # jobs (2)
- # klipse (74)
- # off-topic (3)
- # om (81)
- # onyx (35)
- # parinfer (4)
- # pedestal (1)
- # perun (20)
- # planck (9)
- # proton (1)
- # re-frame (17)
- # reagent (3)
- # ring-swagger (1)
- # rum (7)
- # untangled (63)
- # vim (8)
deleted my m2, same problem. when checking netstat, i do not see the datomic ports in use... however i can still do (get-database-names "...") . some part of transactor is just not happening ๐
@robert-stuttaford #uri
complains RuntimeException No reader function for tag uri clojure.lang.LispReader$CtorReader.readTagged
@jaret (java.net.URI. "
works from datomic REPL, but 500 for curl ;(
BTW: is there a way to get more meaningfull errors than 500 to anything that is wrong with REST service? it is rather annoying ๐
coulda sworn there was one for java.net.URI
will check quickly how about curling #uri
nope, 500 ๐
@robert-stuttaford i tried #uri
from datomic repl
maybe it is available in a full env...
but i need to use REST endpoint, at least for nowโฆ.
also found Stuart Halloway mentioning that URI is a memory hogโฆ so maybe best practice is to actually avoid that and use strings?
we use strings
that was my first instinct when modelling, but then noticed that uri type and hey! looks cool ๐
so i was baited into it ๐
strings then. But still i do consider it to be actually a real PITA that docs do not mention that one can not insert URI datatype using rest. OR if one can, how to do it. ๐
a short-coming, to be sure
Is there a simple way to get datomic to return me all the attributes under a certain ns? user/###
or do I have to get all the attribute idents and do some pattern matching on them ๐
It should match on any entity has that attribute but any value @yonatanel
@mbutler Thanks. I wanted to parameterize the query with the desired status or not checking status at all, but without concat.
Sorry, not sure I 100% follow, is your problem solved? Or are you saying you want it to match on either a status value you pass in or ignore it? Code example might help ๐
@mbutler Well, I use concat to build the query according to some parameter. I either include a clause for the status or not include it at all (matching either on a value or ignoring it). I wanted to avoid concat but not sure it's possible or if there's any benefit to it like the query will somehow be optimized.
when you dont include it do you want it to match on any value of :entity/status
or match even if there isnโt an :entity/status
attribute on that entity
That should work
An or
should work as well
Actually the whole thing is pointless since I need to alter the query according to some variable. Never mind.
No problem ๐
Good luck ๐
For anyone curious here is the query I ended up with to find all attributes of a certain ns
(d/q '[:find ?ident
:in $ ?input-ns
:where
[?e :db/cardinality _]
[?e :db/ident ?ident]
[(namespace ?ident) ?ns]
[(= ?ns ?input-ns)]] database input-ns)
Interestingly I couldnโt use :db.install/_attribute :db.part/db
as a safety check that I was talking about an attribute, I assume because that attribute entity lives in the db.part/db
and not user
. Anyone know if there is another check I could do or is cardinality safe enough?