|
Something I just noticed. This defines 2 new services/initiators. But to me it seems like these would always be changed in "lock step", meaning I cannot really see a use case for wanting to override your ParameterMetadataRecognizer but not your QueryPlanFactory, nor vice versa. (Also, I very much dislike the name QueryPlanFactory when the thing in fact only deals with native queries, very misleading IMO). I think I'd prefer squashing these into one service, ala:
public interface NativeQueryInterpreter extends Service {
ParameterMetadata getParameterMetadata(String nativeQuery);
NativeSQLQueryPlan NativeSQLQueryPlan createNativeQueryPlan(...);
}
WDYT?
Also, for 5.0 (to address your question from PR), I'm ok in principal with adding a NativeQueryPlan interface and making NativeSQLQueryPlan be an impl of that. But I think we need to review what we want that to expose. In fact, I'd suggest we also review handling of native queries overall in light of lessons-learned as well as new requirements for OGM, etc.
|