public function outputJSON()
    {
        if (count($this->data) > 1 && $this->outputMode == self::MODE_SINGLE) {
            throw new \Exception('multiple records returned, but output-mode is single?');
        }
        return $this->formatJSON();
    }
public function outputJSON()
    {
        if (count($this->data) > 1 && $this->outputMode == self::MODE_SINGLE) {
            throw new \Exception('multiple records returned, but output-mode is single?');
        }
        return $this->formatJSON();
    }
public function outputJSON ( ) { if ( count ( $ this -> data ) > 1 && $ this -> outputMode == self :: MODE_SINGLE ) { throw new \ Exception ( 'multiple records returned, but output-mode is single?' ) ; } return $ this -> formatJSON ( ) ; }
used this function to perform some final checks on the result set before passing to the adapter

@return mixed
@throws \Exception
used this function to perform some final checks on the result set before passing to the adapter