protected function queryID(string $sql, array $params = [], array $options = []) {
        $options += [Db::OPTION_FETCH_MODE => 0];
        $this->query($sql, $params, $options);
        $r = $this->getPDO()->lastInsertId();

        return is_numeric($r) ? (int)$r : $r;
    }