You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Byron Foster <bf...@base2.cc> on 2001/10/30 02:19:40 UTC

Returning row counts


Hello,

     I was considering in Torque implementing the ability to return only
the number of rows that match a given criteria, and not any object data.
>From reviewing the code it is my understanding that Torque does not do
this now?  This is desirable in the cases a large amount of data is
stored but only a small portion of it will be retrieved.  The obvious
example would be a web page that allows the functionality to page
through the data.

    I thought this would be implemented by adding a method doSelectCount
to the Peer objects that would take the same parameters as doSelect, but
would return an int value with the number of matching rows.  The
underlying SQL generated would use the "select count(*) from foo" style
of syntax. 

Thoughts?

Thanks,
Byron

  


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>