private function free($link)
{
$query = $this->controller->getQuery($this->driver, $link);
if ($query) {
try {
$this->driver->query($link, $query->getExpression());
$this->active->attach($link, $query);
} catch (\Exception $err) {
$this->active->detach($link);
$query->reject($err);
}
} else {
$this->active->detach($link);
}
}