Re: statement's hashCode() - Mailing list pgsql-jdbc

From Felipe Schnack
Subject Re: statement's hashCode()
Date
Msg-id 1040922766.1734.46.camel@desenv1.ritterdosreis.br
Whole thread Raw
In response to Re: statement's hashCode()  (Dave Cramer <Dave@micro-automation.net>)
Responses Re: statement's hashCode()  (Barry Lind <blind@xythos.com>)
List pgsql-jdbc
  This is exactly what I want!!!
  Would you accept this patch? :-)

On Thu, 2002-12-26 at 15:07, Dave Cramer wrote:
> Felipe,
>
>
> What you could do is return hashCode() on the stringbuffer.toString() of
> the query. This would be highly dependant on when it was called however.
>
> assuming you wanted to know if they were equal after all of the setXXX
> methods were called than this would work.
>
>
> Dave
> On Thu, 2002-12-26 at 11:52, Felipe Schnack wrote:
> >   I'm writing some routines that could be improved vastly if I had a
> > hash to identify an AbstractJdbc1Statement. What I need is a method that
> > returns me an equal value when two instances of the Statement class have
> > the same SQL query and parameters.
> >   I just took a look at the sources and noted that right now this class
> > (AbstractJdbc1Statement) does not implement a custom hashCode()
> > function... Maybe some of you experts in its implementation could give
> > me some tips about how I could implement this?
> --
> Dave Cramer <Dave@micro-automation.net>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
--

Felipe Schnack
Analista de Sistemas
felipes@ritterdosreis.br
Cel.: (51)91287530
Linux Counter #281893

Centro Universitário Ritter dos Reis
http://www.ritterdosreis.br
ritter@ritterdosreis.br
Fone/Fax.: (51)32303341


pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: statement's hashCode()
Next
From: Barry Lind
Date:
Subject: Re: OT jdbc2.0 extention