This method converts a series of rows to beans.
The type of the desired output beans can be specified in the
first parameter. The second parameter is meant for the database
result rows.
Usage:
$rows = R::getAll( 'SELECT * FROM ...' )
$beans = R::convertToBeans( $rows );
As of version 4.3.2 you can specify a meta-mask.
Data from columns with names starting with the value specified in the mask
will be transferred to the meta section of a bean (under data.bundle).
$rows = R::getAll( 'SELECT FROM... COUNT(*) AS extra_count ...' );
$beans = R::convertToBeans( $rows );
$bean = reset( $beans );
$data = $bean->getMeta( 'data.bundle' );
$extra_count = $data['extra_count'];