This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-01-06
Channels
- # architecture (8)
- # aws (2)
- # beginners (156)
- # boot (163)
- # cider (22)
- # cljs-dev (2)
- # cljsrn (11)
- # clojars (6)
- # clojure (328)
- # clojure-austin (7)
- # clojure-dusseldorf (10)
- # clojure-italy (2)
- # clojure-russia (19)
- # clojure-spec (178)
- # clojure-uk (86)
- # clojurescript (81)
- # cursive (17)
- # datomic (33)
- # funcool (40)
- # hoplon (8)
- # jobs (5)
- # klipse (13)
- # leiningen (1)
- # luminus (21)
- # off-topic (140)
- # om (49)
- # om-next (4)
- # onyx (29)
- # planck (5)
- # protorepl (2)
- # re-frame (58)
- # reagent (2)
- # remote-jobs (4)
- # ring-swagger (16)
- # testing (1)
- # untangled (26)
- # yada (27)
hey guys quick question. I’ve got some datomic ‘enums’ i’ve created. do you know of any way to say list all of them with a certain prefix. say I’ve db/ident’ed :action/View, :action/Edit, etc and I want to get back a list of everything “:action"
@eoliphant Not built-in AFAIK. Could probably use (comp #{"action"} namespace)
as a predicate in a query or just a plain query+`filter`.
(d/q '[:find [?i ...]
:in $
:where
[?a :db/ident ?i]
[((comp #{"artist"} namespace) ?i)]]
(d/db (d/connect uri)))
=> [:artist/albums :artist/name]
if any of you guys are still around @potetm , now running into a problem, i was using the collection binding to get going, but i need to pass in other variables, so I’ve switched over to a relation binding, but i’m getting a weird error.
(d/q '[:find ?e
:in $ [[?subject ?scopes ]]
:where
[?s :subject/identifier ?subject]
[?e :assignment/subject ?s]
[?e :assignment/contexts ?scopes]
[?e :assignment/roles ?roles]
[?roles :role/privileges ?privs]
[?privs :privilege/action :action/View]
[?privs :privilege/object :object/Award]
] db [["Andre Awarder"] scopeids] )
IndexOutOfBoundsException clojure.lang.PersistentVector.arrayFor (PersistentVector.java:158)
I’ve got the 2 vars in the in clause and a list of 2 lists as the variable. But no idea why it’s complaining hereThe form you have specified there indicates that the input should be a list of 2-tuples
Is there a function that, like temp-id?, that checks if an id is a temp-id or not?
I did this: (-> id last val neg?)
transactor or peers? have not done any, by the way 🙂, but could be interested...
specifically for peers. i wrap them in docker atm, but sliding level down to packer and using systemd for lifecycle could be beneficial at some point :thinking_face:
@jonpither fantastic. cant help but will read blog for sure 😄
yeah, setting up transactor is a bit of kludgy atm. Even with terraform 😕
I think at least the packer bit can remove the fetching and installing of Datomic, if not the running with precise args (that last bit you'd still want Terraform)
Also with Packer you'd then have complete control of your AMI, so can choose to open up SSH etc
(you get complete control with Terraform also, but ideally the AMI should prebake as much as is sensible)
we’re using the stock AMI with TF
now that we’re no longer injecting the Datadog agent into the instance, it’s working great. for some reason it interfered with self-termination
Hello, I'm having problems with some characters in the fulltext
(d/q '[:find ?e ?name
:in $ ?search
:where [?e :user/name]
[(fulltext $ :user/name ?search) [[?e ?name]]]]
db search)
When the search
contains a !
(and same other chars, in some positions), an exception occurs.Is this foreseen (I did not find anything in the docs)? Is there a blacklist of characters?
When looking at :tx-data
coming off the txReportQueue
, it seems that :db/txInstant
is always the first datom in the list. This makes it easy to find it. Is this part of the API proper, or should I not rely on it being like this?