-
Notifications
You must be signed in to change notification settings - Fork 11
Materialize shape into an ETS table #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
160f2f0 to
9bf7897
Compare
| This allows you to subscribe to the shape and receive notifications and | ||
| also retrieve the current dataset. | ||
|
|
||
| `to_list/2` will return the current state of the shape as a list: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Experience from working with shapes and collections tells me that to_list is one way you may want the data but having map access, keyed on the ID, is also very helpful. Could you provide has, get, etc.? Or even implement Enumerable? How convenient can we make the data access?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. I've added a stream/1,2 function that returns a lazy stream of the data as well as to_map/1,2
I've also added find/3 as a wrapper around stream/1 to simplify finding values in the collection -- I think this is as close to get as we're going to get without going through to_map.
1807c16 to
e6d1b28
Compare
that emits sync events from updates within a sandboxed transaction
increase timeout for receive
96a6025 to
ee26ff7
Compare
Fixes #58