Granada\ORM::_add_result_column PHP Method

_add_result_column() protected method

Internal method to add an unquoted expression to the set of columns returned by the SELECT query. The second optional argument is the alias to return the expression as.
protected _add_result_column ( $expr, $alias = null )
    protected function _add_result_column($expr, $alias = null)
    {
        if (!is_null($alias)) {
            $expr .= " AS " . $this->_quote_identifier($alias);
        }
        if ($this->_using_default_result_columns) {
            $this->_result_columns = array($expr);
            $this->_using_default_result_columns = false;
        } else {
            $this->_result_columns[] = $expr;
        }
        return $this;
    }
ORM