You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ddlutils-user@db.apache.org by Thomas Heinis <he...@inf.ethz.ch> on 2008/02/01 16:15:24 UTC

Platform & PlatformImplBase

Dear all,

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?
    - 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?

Cheers,

Thomas

Re: Platform & PlatformImplBase

Posted by Thomas Dudziak <to...@gmail.com>.
On Feb 1, 2008 7:15 AM, Thomas Heinis <he...@inf.ethz.ch> 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