db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <Fisc...@seitenbau.net>
Subject Re: [SOURCE] Issue #TRQS256 had user association modified
Date Mon, 13 Dec 2004 18:18:13 GMT


I do think that the functionality is certainly useful. Doing counts is a
thing that is needed, and I had to do custom code for it every time.

Now for the technical points:

<Martin.Goulet@sungard.com> schrieb am 13.12.2004 18:56:46:

> > 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?

I would also suggest that, unless Henning has a better place, BasePeer ist
the class where the methods should go. Sure, BasePeer has got a lot of
methods already, but one the other hand, the Peer class is the place where
one would look intuitively for such a functionality.

> > 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.

I am of the opinion that one can tolerate modification of the criteria
object. Every select on a table Peer adds its own select columns, so why
shouldn't the count method do the same ? Criterias do not tend to be stored
for a long time, they are throw-away objects.

> > 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?

Well, here I agree with Henning again. He has done a lot of effort to
centralize SQL generation in one place, because only then you  can
guarantee standard behaviour for each call. But I can also change this,
because there are a lot of recent changes in CVS (current active Branch ist
TORQUE_3_1_BRANCH, the methods to build the SQL from Criteria are in
SQLBuilder), so do not bother about this.


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

View raw message