public function getAll($collection_name, $query = array())
{
if (!is_array($query)) {
throw new \Exception("\$query must be an associative array of 'field => value' pairs");
}
$collection = new Collection($collection_name, true, $this);
return $collection->find($query);
}