public function insert($tableName, array $data, array $types = []): int
    {
        $modified = $this->shallModifyIdentityInsert($data)
            && $this->modifyIdentityInsert($tableName, true);

        $result = parent::insert($tableName, $data, $types);

        if ($modified) {
            $this->modifyIdentityInsert($tableName, false);
        }

        return $result;
    }