Fork me on GitHub

i seem to have gotten it working with ’…, not sure when/if that’s taught, but datomic supports it here


@folcon: to confirm what @adambros said, to do a recursive query in Om you have to use the '... syntax, otherwise you'll get a stack overflow as you encountered. Om query syntax has the same specification as datomic for recursive queries (including numeric recursion limits)


Ooops. Did I ask a question that was not covered in the text? I’ll have to check that.


Yeah, that exercise file just needs work. I threw something in in haste, and it just isn’t very good 😛


thanks! I’ll look over it tomorrow simple_smile...


ok, so that worked, though I had to change it to look a bit better, I’m wondering if there’s anything more elegant than what I ended up doing. The basic appearance I got when I finished was:


though I changed it to look a bit better (at least I think so) :)…


which required me to add some extra parts to the when clause. (Specifically (defui Person… (when mate (dom/ul nil (om-person mate))))))) -> (defui Person… (when (and mate (not (vector? mate))) (dom/ul nil (om-person mate)))))))) The exercise is a little undefined about this, but all in all I think it’s alright simple_smile… I’m wondering if anyone has anything more elegant though for dealing with recursive queries like this?


I understand that you can rewrite the parser for your database and I saw some earlier queries about doing this for SQL - I am thinking of doing this for couchdb - maybe looking at clutch and working from there - I just wanted so see if anyone else had gone down this road - I’m not sure I want to get into datomic licensing


@tony.kay: just did the mutation exercises, they’re pretty good simple_smile...


Ah, the more recent ones? Yeah, I thought those came out pretty well...esp the bits that help you understand the follow-on reads.