But driver->prepare() returns a wrapped statement, which gets put into a class extending the original class. Could things be simpler if the LoggingStatement was a transparent decorator? I saw a few other places in the code that were modified for the new decorator.