public function fetchOne($spec, $data = array())
{
if (is_array($spec)) {
// automatically limit to the first row only,
// but leave the offset alone.
$spec['limit']['count'] = 1;
}
$result = $this->fetchPdo($spec, $data);
return $result->fetch(PDO::FETCH_ASSOC);
}