function find($filter = NULL, array $options = NULL, $ttl = 0)
{
if (!$options) {
$options = [];
}
$options += ['group' => NULL, 'order' => NULL, 'limit' => 0, 'offset' => 0];
$adhoc = '';
foreach ($this->adhoc as $key => $field) {
$adhoc .= ',' . $field['expr'] . ' AS ' . $this->db->quotekey($key);
}
return $this->select(($options['group'] && !preg_match('/mysql|sqlite/', $this->engine) ? $options['group'] : implode(',', array_map([$this->db, 'quotekey'], array_keys($this->fields)))) . $adhoc, $filter, $options, $ttl);
}