You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently in order to load a relation, you need to deref the relation atom of a record. This results in a new query being executed. It would be nice to be able to preload relations, querying them with a join instead of separate queries.
A solution could be to add a new function gungnir.query/preload, which will add a :gungnir/preload '(,,,) key to the HoneySQL map. We then need to modify the query before executing it.
Another thing we need to think about is how do we adjust the result of the relation? Normally we swap! the relation atom, but in this case we'd have to do that beforehand. Maybe a function to update preloads?
Currently in order to load a relation, you need to deref the relation atom of a record. This results in a new query being executed. It would be nice to be able to preload relations, querying them with a
join
instead of separate queries.A solution could be to add a new function
gungnir.query/preload
, which will add a:gungnir/preload '(,,,)
key to the HoneySQL map. We then need to modify the query before executing it.Another thing we need to think about is how do we adjust the result of the relation? Normally we
swap!
the relation atom, but in this case we'd have to do that beforehand. Maybe a function to update preloads?The text was updated successfully, but these errors were encountered: