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
Love the datatable concept. One thing that I am currently missing is the ability to update master/superset table while working with data in subset.
An example is:
Master table:
timestamp, portfolio_id, portfolio_group, amount
Subset table:
the same columns
records filtered using subset := master.Where ... timestamp & portfolio_group
I do some more complex operations on the subset and record results for it in the subset.
Now I need to propagate it to the master table.
So, it would be great to know the row index of the row or that the row subset would be a collection of pointers and would update the master directly when doing subset.Update ...
Or maybe I am missing something. I am not that proficient in Golang yet and there is very little documentation and even less can be found on the net.
Thanks for the great tool and hope that you can help me.
The text was updated successfully, but these errors were encountered:
Hi @tomas-kucera sorry for the delay. We did not get any notification from GH about your posted issue.
Are you talking about a "nested table" concept ? Do you have an explicit example of what you want to do?
you use .Where to create a subset of rows, storing it into another datatable
now I am going through the subset and making modifications
what I want is the modifications to be propagated to the table I had created the subset from
I did not find a way to do it via references, so the subset is a new copy and modifying it leave the original datatable unchanged
to be able to update a record you need to know its index in the datatable
since there is no way to read the index of the record, it is impossible to achieve directly
I had workarounded it by creating an explicit field called index that I populate with a sequence number and then when I need to update the original table I use this index in the .Update method. This works OK but has one catch - if you apply sorting or remove some rows, adds some rows, etc. you need to re-index it again, to get it consistent.
Still being able to create a subset using .Where that keep "connected" to the original datatable, so whenever I would update a row in the subset, it would update the original row.
Of course that it should be possible to create a subset as a new copy of data detaching it from the original datatable.
Hi there,
Love the datatable concept. One thing that I am currently missing is the ability to update master/superset table while working with data in subset.
An example is:
Master table:
timestamp, portfolio_id, portfolio_group, amount
Subset table:
I do some more complex operations on the subset and record results for it in the subset.
Now I need to propagate it to the master table.
So, it would be great to know the row index of the row or that the row subset would be a collection of pointers and would update the master directly when doing subset.Update ...
Or maybe I am missing something. I am not that proficient in Golang yet and there is very little documentation and even less can be found on the net.
Thanks for the great tool and hope that you can help me.
The text was updated successfully, but these errors were encountered: