[FLOW3-general] Question about change in Query object since Alpha12
Jigal van Hemert
jigal at xs4all.nl
Tue Oct 12 20:38:38 CEST 2010
Hi,
On 12-10-2010 12:21, Sebastian Kurfürst wrote:
>> Now my question is, does this mean, that the query instanciate the
>> complete result object set and counts over the resultarray?
> Nope, it does it lazily by calling a count() query on the database.
>
> See
> http://git.typo3.org/FLOW3/Packages/FLOW3.git?a=blob;f=Classes/Persistence/QueryResult.php;h=25774d1c29e750aa8c050f1a1bc096f1c89acf21;hb=HEAD
> for the QueryResult object.
Where is the count query? (no criticism, I'd like to learn the structures)
I see that QueryResult::count() either uses a count() of the data if the
dataset is already fetched, or calls
$this->persistenceManager->getObjectCountByQuery($this->query);
PersistenceManager::getObjectCountByQuery() calls
$this->backend->getObjectCountByQuery($query);
Backend::getObjectCountByQuery() results in:
return count($this->getObjectDataByQuery($query));
--
Kind regards / met vriendelijke groet,
Jigal van Hemert
skype:jigal.van.hemert
msn: jigal at xs4all.nl
http://twitter.com/jigalvh
More information about the FLOW3-general
mailing list