it's possible to query for optional parts on many relations?

2014-09-18 Thread Wilker
Hi I'm trying to figure if I can make some parts of my query results to be optional, for example, given the following query: [:find ?name ?age :where [?m :person/name ?name] [?m :person/age ?age]] This will return all entities that has a :person/name and :person/age. Ok, so, if I want to

Re: it's possible to query for optional parts on many relations?

2014-09-18 Thread Wilker
Forgot to mention, I tried the (get-else) but it raises an error about cardinality many not supported, so I guessed it doesn't works here... --- Wilker LĂșcio http://about.me/wilkerlucio/bio Woboinc Consultant +55 81 82556600 On Thu, Sep 18, 2014 at 7:41 PM, Wilker wilkerlu...@gmail.com wrote:

Re: it's possible to query for optional parts on many relations?

2014-09-18 Thread Ashton Kemerling
Couldn't you just retrieve users and use entity to get their photos? On Thu, Sep 18, 2014 at 4:43 PM, Wilker wilkerlu...@gmail.com wrote: Forgot to mention, I tried the (get-else) but it raises an error about cardinality many not supported, so I guessed it doesn't works here... --- Wilker

Re: it's possible to query for optional parts on many relations?

2014-09-18 Thread Wilker
Yes I could, but I'm trying to stick on the philosophy of define your data at query time, so I would like to move all query stuff to Datomic, also, even if I don't use, I still would like to know if that's possible, I'm still very noob to Datomic and so trying stuff around. But considering all