Skip site navigation (1) Skip section navigation (2)

Re: Patch for jdbc escaped functions

From: Kris Jurka <books(at)ejurka(dot)com>
To: Xavier Poinsard <xpoinsard(at)free(dot)fr>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Patch for jdbc escaped functions
Date: 2004-11-24 10:57:44
Message-ID: Pine.BSO.4.56.0411240552480.6336@leary.csoft.net (view raw or flat)
Thread:
Lists: pgsql-jdbc

On Mon, 22 Nov 2004, Xavier Poinsard wrote:

> > I also don't like the prospect of a giant if/else block that has every
> > function that must do some kind of mapping/translation.  What about a more
> > pluggable architecture perhaps along the lines of the following:
> > 
> > public interface StandardFunction {
> > 	public void toSQL(StringBuffer sb, ArrayList args);
> > }
> > 
> > Then a static HashMap of say lowercase function name -> StandardFunction 
> > implementation can move all of the mapping/translation into a separate 
> > place.  Maybe that's overkill in the opposite direction.  Thoughts?
> 
> I used reflection to move the translation part to EscapedFunctions class.
> Right ?
> 

I'm not sure why you are using reflection.  The available functions will 
be a static list, so I don't see what the purpose of dynamically 
inspecting this class is.  Having one class instead of dozens?

Kris Jurka

In response to

Responses

pgsql-jdbc by date

Next:From: Thomas HallgrenDate: 2004-11-24 13:16:42
Subject: UNICODE and 8.0.0beta5
Previous:From: Peter EisentrautDate: 2004-11-24 10:19:44
Subject: Re: Copying into Unicode - Correcting Errors

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group