Testing attribute against list in datomic datalog -


i test in clause in datalog if attribute in particular set (or list). example want test whether :tag-type/code in ["urgent" "todo"] . can this:

   (or        [?tag-type :tag-type/code "urgent"]        [?tag-type :tag-type/code "todo"]         ) 

but list parameter. ?tag-names , in lines of :

       [?tag-type :tag-type/code *in* [?tag-names])] 

is possible ?

a friend - without account! - has helped me out. can specify collection in :in-clause :

[?collection-name  ...] 

yielding :

(d/q '[:find (pull ?tag-type "[*]")        :in $ [?tag-names ...]         :where         [?tag-type :tag-type/code ?tag-names]]          the-db ["urgent" "todo"]) 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -