Re: Writing portable SQL code in Java - Mailing list pgsql-jdbc

From Laurent Duperval
Subject Re: Writing portable SQL code in Java
Date
Msg-id 20010516152218.50465468AE@lenard.microcelli5.com
Whole thread Raw
In response to Re: Writing portable SQL code in Java  ("Dave Cramer" <Dave@micro-automation.net>)
List pgsql-jdbc
On 16 May, Dave Cramer wrote:
> You might try using a class structure which abstracts out various problems,
> and has unique methods for each different implementation
>
>
> ie a base class which would be something like SQLDatabase which implements
> all of the various calls. Then you could extend this for each unique db such
> as Oracle. So for oracle you would implement getUnique one way, and for
> postgres you would implement the getUnique the postgres way.
>

Taht was also suggested to me by private email. I think that's what I'd do.

> This would probably have to be a singleton, and be created at run time.
>
> Of course you could forgo all of the above and just use a persistence layer
> such as castor and forget about sql all together ;)
>

Oh, I didn't know about Castor. Yes, that's something we eventually want to
do but we can't in the short term. We've started looking at TopLink and
CocoBase also.

Thanks,

L

--
Laurent Duperval <mailto:lduperval@microcelli5.com>

On prend le bon air qui vivifie et qui se répand dans les cavités thoraciques
de l'honnête homme comme du miel sur la tartine d'un affamé!
                                             -Achille Talon


pgsql-jdbc by date:

Previous
From: "Dave Cramer"
Date:
Subject: Re: Writing portable SQL code in Java
Next
From: Bruce Momjian
Date:
Subject: Re: patches for jdbc1 (fwd)