Fork me on GitHub

Not really Fulcro thing but an interesting use-case I’ve got: I tried to use EQL (like queries) to describe updates to a normalized DB-like map by trees and I found the join format quite limiting… it’s not easy to specify any extra info like cardinality of join or which data structure to use for join property (e.g. to use set instead of vector for to-many join). I see many things around EQL being done with meta on it, which is brittle. I wonder if people ever considered a different format.


joins can have arbitrary parameters


{(:join key {:x 1}) [:subquery]}


however, the example you provide have nothing to do with the query. Those a schema, which the query cannot, by definition, actually define. So, it makes no sense to say them in the query. This is why RAD has you declare attributes with extra info on them, so that data is available to utilities outside of query


That is how, for example, the Datomic RAD plugin is able to do any arbitrary save from a simple normalized diff. The attributes say everything there is to know about themselves in the model.


(where they can live, which database they are meant to be persisted in, uniqueness, validation, etc.)


a to-many is only set-compatible if the database itself defines some kind of uniqueness constraint. Having data returned in a vector that happens to be distinct is an application level concern that is easily addressed by the receiver of the result, and need not be complected into the query language itself. The parameter support allows the query to add parameters, as I said, so it is possible to send information to an arbitrary query engine that is only appropriate to handle there, such as limit, offset, etc. Though many (not all) of those are also better handled by the client since there is no reason to add burden to a centralized resource (your database) that a distributed resource (the client) could do instead (on their dime)


But as a pure “extra info” desire: parameters in EQL answer the need quite nicely.


Another heads up from me (sorry :D) breaks compilation if only pathom3 exists on the classpath. Pathom3 doesn't have the common.async-clj ns anymore. I just cleaned up my classpath and some deps aliases for the first time since forever and this bit me.


How do you access functions on a react class? I imported this class as QrReader and I don’t know how to access this function. I also tried to call it on an element created by a component factory

Jakub Holý (HolyJak)14:12:20

you mean on a class or an instance?

Jakub Holý (HolyJak)15:12:30

Not sure how I would do that in JS actually. This provides an example impl , i.e. via getting a ref to the child. Perhaps the same can work here? Another one also uses ref