[Dbix-class] Component to be loaded to both Result and ResultSet?
Александр Поволоцкий
tarkhil at over.ru
Fri Jan 14 20:15:25 GMT 2022
Hello
Maybe I'm asking about quite simple thing, but maybe not.
I've implemented TO_JSON method for both result and resultset. For
result, it's basically get_columns with automatic deflate datetime to
specified format, for resultset it's calling TO_JSON for every result in
set.
Currently I've splitted it to two modules, one to be loaded into Result,
one into ResultSet, but is it possible and good practice to make just
one component, behaving differently for Result and ResultSet parent?
Or maybe I've just overlooked some good pre-existing module?
--
Alex
More information about the DBIx-Class
mailing list