database icon indicating copy to clipboard operation
database copied to clipboard

Configuring row normalization

Open hrach opened this issue 11 years ago • 5 comments

Would be nice to have confirugable normalization of database row result. Currently, it's impossible to add own new normalization (like pgarray?). On the other hand, it's impossible to disable some normalization (like all transforms to datetime/dateinterval, ...)

hrach avatar Oct 25 '14 08:10 hrach

Any idea, how api could look? cc @dg

hrach avatar Oct 25 '14 08:10 hrach

Does it have to be solved with configuration? Why not just extract to logic from ResultSet to RowNormalizer?

JanTvrdik avatar Oct 25 '14 10:10 JanTvrdik

Of course, configuratin means just some API :-) The question, how to inject own RowNormalizer into ResultSet.

hrach avatar Oct 25 '14 11:10 hrach

Global service for default normalizer injected by constructor to ResultSet + setter on ResultSet for specific behavior on a single result.

Regarding current implementation – why is driver-specific normalization called after general normalization and not before?

JanTvrdik avatar Oct 25 '14 12:10 JanTvrdik

This feature would be great, because sometimes I don't need normalization overhead. Workaround I use is ResultSet::getPdoStatement()->fetch().

KacerCZ avatar Apr 01 '15 07:04 KacerCZ