On Feb 1, 2008 7:15 AM, Thomas Heinis <[EMAIL PROTECTED]> wrote: > I have two issues, one with the Platform interface and one with the > PlatformImplBase: > - the Platform interface provides each method in two different > versions, with or without the connection as an argument. This is the > case for all methods implementing DB operations (insert/update/delete > etc.) except for fetch. Why is this so?
The method variants that take a Connection are useful for users of the API that either manage the connection themselves (e.g. DdlUtils is used within a larger application that also uses the database connection for other purposes). Or for scenarios where multiple DDL operations are performed and hence it would not make sense to close and reopen the database connection in between. > - I suspect the second issue I have with DdlUtils as of now is > related to the first. The fetch method does not return the connection. > Instead, the connection is returned in the cleanUp method of the > ModelBasedResultSetIterator. Wouldn't it be simpler to (and more elegant > for reasons of symmetry) to return the connection in the fetch method? It certainly makes sense to have variants of the fetch and query methods that take a connection (and feel free to create a JIRA issue for that). Tom
