public function close(): void
    {
        if ($this->pdo instanceof PDO) {

            if ($this->stmt !== null) {
                $this->stmt->closeCursor();
            }

            $this->stmt = null;
            $this->pdo = null;

        } else if ($this->pdo === null) {
            // to nothing
        } else {
            throw new AdapterException('Unable to close database connection when PDO handler is not an instance of PDO');
        }
    }