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
{{ message }}
This repository has been archived by the owner on Apr 11, 2019. It is now read-only.
Everything in the library works really well and it's easy to use. Only thing I'm missing is support for History objects. I wrote a simple version that does what I need, but I don't think it's complete enough to be added to master.
Couple things that need to be considered:
This version handles all Values as strings. This was trivial to implement since the reflector works great. It would also be quite easy to add version that checks history parameter and passes proper struct type to reflector. Problem with this is that it would need to either return interface{} (or an actual interface with getters), which is not how rest of the system works and is ugly. Another version would be to have Value as interface{}, in which case it would need to be casted to proper value each time, which is even worse.
I wrote a test, but since I'm using actual db and not an empty one it doesn't create new History object, thus it would fail on an empty db.
There's also the possibility of having separate GetHistoriesFloat(), GetHistoriesText() (or GetTextHistories()), etc. That would allow one to have separate return types for each of the different history types.
Everything in the library works really well and it's easy to use. Only thing I'm missing is support for History objects. I wrote a simple version that does what I need, but I don't think it's complete enough to be added to master.
Couple things that need to be considered:
history
parameter and passes proper struct type to reflector. Problem with this is that it would need to either returninterface{}
(or an actual interface with getters), which is not how rest of the system works and is ugly. Another version would be to have Value as interface{}, in which case it would need to be casted to proper value each time, which is even worse.You can see the commit here: errnoh@9e6d3a1
The text was updated successfully, but these errors were encountered: