public function fetchRow($mode = null)
    {
        $spec = $this->getResult();

        if( $mode === null ) {
            $mode = $this->getResultMode();
        }

        $data = null;
        switch( $mode ) {
            case self::FETCH_ASSOC:
                $data = $spec->fetch_assoc();
                break;
            case self::FETCH_COLUMN:
                if( ($row = $spec->fetch_row()) && is_array($row) ) {
                    $data = current($row);
                } else {
                    $data = null;
                }
                break;
            case self::FETCH_NUM:
                $data = $spec->fetch_row();
                break;
            case self::FETCH_OBJECT:
                if( null !== $this->resultClass ) {
                    if( null !== $this->resultParams ) {
                        $data = $spec->fetch_object($this->resultClass, $this->resultParams);
                    } else {
                        $data = $spec->fetch_object($this->resultClass);
                    }
                } else {
                    $data = $spec->fetch_object();
                }
                break;
        }

        $this->free();
        return $data;
    }