Fork me on GitHub
#om
<
2017-01-07
>
ag02:01:52

if I have a denormalized value, and then piece of query, what’s the best way to trim the value? e.g. value: [:rows [{:name “one” :id 1}{:name “two” :id 2},,] and the query is [:name], meaning I need for every row grab only the name and drop everything else

ag02:01:30

and I wanna do it efficiently in the read method.

SoV406:01:47

@ag the Om Next queries are basically datomic matches. I think reading a bit on that topic may illuminate the structure and syntax. http://docs.datomic.com/query.html Scroll down to the queries that have a where clause.

mavbozo12:01:15

in many om.next examples, I see alot of @state inside defmethod read :some/key. I worry that I get inconsistent total query result because each :some/key read deref the global state

anmonteiro13:01:42

@mavbozo I don't understand your concern, since JS is single threaded

anmonteiro13:01:43

@ag (map #(select-keys % query) data)?

jfntn21:01:48

Is there a way to get tempids reconciliation for remote reads with the default reconciler merge functions?

jfntn21:01:05

Our initial app-state contains a stub for :app/user that gets overwritten when the remote read is merged, we’d like to make sure the remote result gets merged in the existing one

scknkkrer22:01:32

Guys, I need a technical defination. What is om library, what does do generally ?