Code quality: reimplement DbChange as variant #35
Labels
good first issue
Good for newcomers
level:medium
This issue is of average difficulty
priority:low
Priority: low
status:up for grabs
This issue is a good candidate for PR
type:refactoring
Improving the code quality
DbChange
class is clearly used in ways it was not designed for.The class definition:
Uses
parameter
(a public field!) as a black-box container for basically everything, and database is expected to dispatch this checking change type.The most egregious example of this is the UpdateIterator change, which uses string parameter to pass two integers (!).
I think we should rewrite this class using std::variant, similarly to the Command class.
So we'll have use:
And dispatch using
std::visit
method.The text was updated successfully, but these errors were encountered: