-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Ability to "collapse" data #32
Comments
To be honest Nick, I hadn't considered that... if you're talking about collapsing for the sake of space savings, the tree version should in theory be smaller than any other version. It "looks" bigger, having added structure fluff around the data, but removes all data duplication. Given that treeize was originally designed to remove the duplication from say... a SQL join type dataset (where data from one or more records is repeated for each child row), there can be a lot of duplication without it. Mind giving me a couple line example of what you're proposing so I understand it better? |
@kwhitley definitely. The benefit behind having a collapse function would be to put grown data (in tree form) back to a flat data structure. For example, if I was updating a single row of data, it would allow me to take something like:
to a flat data structure such as:
This would allow for a super simple create and update on a row. As it stands right now, it's extremely difficult to reverse the grown data into a flat structure. Figured it would be a great value add. |
Ah, gotcha. Shouldn't be too difficult to implement... I believe I store the On Tue, Dec 9, 2014 at 11:53 AM, Nick Parsons [email protected]
|
@kwhitley Awesome! It would be a game changer for me. I look forward to seeing what you come up with. |
Very sorry for the delay @nparsons08 - I've added in a simple |
I wrote an untreeize library you might find useful: https://www.npmjs.com/package/untreeize |
@cscalfani So awesome!!! I'll do a few tests on it and include your lib in the docs 👍 :) |
For POST and PUTS, I feel it would be a great value add to allow for collapse functionality. That would mean taking a tree like data structure and returning it to its original form. Is this on the roadmap and/or do you have any recommendations on how to implementation for the time being?
The text was updated successfully, but these errors were encountered: