Re: Couting the objects that would be returned by a fetch specification
Re: Couting the objects that would be returned by a fetch specification
- Subject: Re: Couting the objects that would be returned by a fetch specification
- From: Robert Walker <email@hidden>
- Date: Sun, 22 Jan 2006 01:11:32 -0500
I just simply use raw SQL for this using EOUtilities.rawRowsForSQL
(ec, modelName, sql, keys). Just send the SQL something like "SELECT
COUNT(OID) FROM MY_TABLE"
This will return the result in an array containing one raw row
dictionary. In the fourth argument of the method you can supply a
key that you can use to extract the count.
--
Robert Walker
email@hidden
There are 10 types of people in the world, those who count in binary,
and those who don't.
On Jan 21, 2006, at 3:40 PM, Jerry W. Walker wrote:
Hi, Miguel,
You might try CountFetcher.java which can be downloaded from:
http://wocode.com/cgi-bin/WebObjects/WOCode.woa/2/wa/
ShareCodeItem?itemId=429
Regards,
Jerry
On Jan 21, 2006, at 2:10 PM, Miguel Arroz wrote:
Hi!
This is probably very obvious, but... how can I count the
objects that would be retuned by a fetch specification, but
without actually fetching them (or creating faults for them)? What
I would like to do is something like the COUNT SQL function.
Yours
Miguel Arroz
"We have no sympathy for the lost souls
We've chosen the path of disgrace
We give this life to our children
And teach them to hate this place" -- Apocalyptica, Life Burns!
Miguel Arroz
http://www.ipragma.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com
This email sent to email@hidden
--
__ Jerry W. Walker,
WebObjects Developer/Instructor for High Performance Industrial
Strength Internet Enabled Systems
email@hidden
203 278-4085 office
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mac.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden