yii\db\DataReader::getColumnCount PHP Method

getColumnCount() public method

Note, even there's no row in the reader, this still gives correct column number.
public getColumnCount ( ) : integer
return integer the number of columns in the result set.
    public function getColumnCount()
    {
        return $this->_statement->columnCount();
    }