db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Martin.Gou...@sungard.com>
Subject RE: Re: [SOURCE] Issue #TRQS256 had user association modified
Date Mon, 13 Dec 2004 17:56:46 GMT
> Uh, do we really want to bloat up the Peer classes any further? What
> sense in putting this into BasePeer?

Ok, where would you put it?

> We have constants for "ASC" (SqlEnum.ASC), please use these. (why
> entries[1].compareTo()? What is bad with equals()?)

Good point

> Why are you doing all the shebang in count(Criteria, Connection,
> columnName, distinct) ?  Am I missing something?

In order to issue the 'count' call the criteria is modified. So in order
to restitute it in the original form, we are resetting the columns and 
the 'order by columns' in the original states. With this, the called
doesn't
need to keep a copy of his original object.

> You should be able to get the deliminator from buildQuery()? 

> Why use the doSelect() anyway? Why not use the primitives to build the
> SQL string and send it to the DB?

Why not?

> If you build strings like this: 
> c.addSelectColumn( "COUNT("+ (distinct?"DISTINCT ":"") +columnName
+")" );
> please use a StringBuffer() 

Good point.

Thomas Fischer: I'll resubmit another patch with the modifications to
use
SqlEnum and StringBuffer. 

Henning: Thx for the feedback! (even though bedside manners doesn't seem
to be your strong point...
remember I just want to contribute a bit back to the community with a
feature that I think is 
useful)

MG 
-- 
Martin Goulet, B.Sc. 
Senior Software Architect
SunGard Front Office Solutions 
Email: Martin.Goulet@sungard.com 
Web: www.online.sungard.com 



-----Original Message-----
From: Henning P. Schmiedehausen [mailto:hps@intermeta.de]
Sent: Monday, December 13, 2004 12:26 PM
To: torque-dev@db.apache.org
Subject: Re: [SOURCE] Issue #TRQS256 had user association modified


thomas fischer <fischer@seitenbau.de> writes:

>You can view the issue detail at the following URL:

>    http://nagoya.apache.org/scarab/issues/id/TRQS256

>Type
> Enhancement

>Issue ID
> TRQS256 (count methods addition to the BasePeer class)

Uh, do we really want to bloat up the Peer classes any further? What
sense in putting this into BasePeer?

We have constants for "ASC" (SqlEnum.ASC), please use these. (why
entries[1].compareTo()? What is bad with equals()?)

Why are you doing all the shebang in count(Criteria, Connection,
columnName, distinct) ?  Am I missing something?

You should be able to get the deliminator from buildQuery()? 

Why use the doSelect() anyway? Why not use the primitives to build the
SQL string and send it to the DB?

If you build strings like this: 

c.addSelectColumn( "COUNT("+ (distinct?"DISTINCT ":"") +columnName +")"
);

please use a StringBuffer() 

All in all, I'm -0 on this patch. I don't really see the benefit to
have it around in the BasePeer and it seems to complicated to me.

As this is a static method anyway, why not move it into another helper
class?

	Regards
		Henning

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/

RedHat Certified Engineer -- Jakarta Turbine Development  -- hero for
hire
   Linux, Java, perl, Solaris -- Consulting, Training, Development

What is more important to you...
   [ ] Product Security
or [ ] Quality of Sales and Marketing Support
              -- actual question from a Microsoft customer survey

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message