Is this something that should possibly be added to the xxxPeer class? or perhaps to the BasePeer class?
> -----Original Message----- > From: John McNally [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 12, 2002 11:24 AM > To: Turbine Torque Developers List > Subject: RE: get object/row count > > > Criteria crit = new Criteria(); > crit.addSelectColumn("count(*)"); > ... add more stuff to crit ... > List records = FooPeer.doSelectVillageRecords(crit); > int count = ((Record)records.get(0)).getValue(1).asInt(); > > john mcnally > > On Wed, 2002-09-11 at 09:39, Russell Smyth wrote: > > That would be terribly expensive for a table and/or criteria > > with a large number of rows - ie if there are 10,000 results, > > there would be at least 20,000 object creations (the village > > Record object and the Torque object). Surely much more expensive > > and slower than "select count(*) from TABLE" > > > > We have some tables with >10,000,000 rows, so this is a concern > > for us. > > > > > -----Original Message----- > > > From: Stephen Haberman [mailto:[EMAIL PROTECTED]] > > > Sent: Wednesday, September 11, 2002 6:58 AM > > > To: 'Turbine Torque Developers List' > > > Subject: RE: get object/row count > > > > > > > > > Terribly late on the reply, but what about: > > > > > > Criteria c = new Critera(); > > > . > > > List l = XxxPeer.doSelect(c); > > > > > > l.getSize() > > > > > > or l.size()? I forget off the top of my head. > > > > > > - Stephen > > > > > > > -----Original Message----- > > > > From: Russell Smyth [mailto:[EMAIL PROTECTED]] > > > > Sent: Wednesday, August 21, 2002 8:20 PM > > > > To: 'Turbine Torque Developers List' > > > > Subject: get object/row count > > > > > > > > Do torque peers have a way to simply/quickly get a count of > > > rows/objects for > > > > a set of criteria? or for the table as a whole? I dont see > > > one, and in > > > > trying to implement one in my Peer extension I cannot find > > > a straight > > > > forward way to do so.. > > > > > > > > Thanks in advance > > > > Russell Smyth > > > > > > > > -- > > > > To unsubscribe, e-mail: <mailto:turbine-torque-dev- > > > > [EMAIL PROTECTED]> > > > > For additional commands, e-mail: <mailto:turbine-torque-dev- > > > > [EMAIL PROTECTED]> > > > > > > > > > -- > > > To unsubscribe, e-mail: > > > <mailto:[EMAIL PROTECTED]> > > > For additional commands, e-mail: > > > <mailto:[EMAIL PROTECTED]> > > > > > > > -- > > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
