Re: Writing portable SQL code in Java

From: Laurent Duperval <lduperval(at)microcelli5(dot)com>
To: Dave(at)micro-automation(dot)net
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Writing portable SQL code in Java
Date: 2001-05-16 15:21:48
Message-ID: 20010516152218.50465468AE@lenard.microcelli5.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)microcelli5(dot)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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Bruce Momjian 2001-05-16 16:19:12 Re: patches for jdbc1 (fwd)
Previous Message Dave Cramer 2001-05-16 14:58:42 Re: Writing portable SQL code in Java