Closed chfin closed 4 years ago
That sounds good. I just find it hard sometimes to draw the boundary here. My priority was to write queries that don't expose the structure of the database outside of its namespace. But I'm sure there are query functions in the code that could be refactored into a pure function and a more primitive database update. Do you have specific examples of those?
I'll have a look through the code. If I find a consistent way to do this, I'll make a PR.
Nice!
solved by #11
Operations on the data structure in the database should be pure functions and just return the new data structure. Updating/dereferencing the db ref should be a separate step.