Granada\ORM::_build_select_start PHP Method

_build_select_start() protected method

Build the start of the SELECT statement
protected _build_select_start ( )
    protected function _build_select_start()
    {
        $fragment = 'SELECT ';
        $result_columns = join(', ', $this->_result_columns);
        if (!is_null($this->_limit) && self::$_config[$this->_connection_name]['limit_clause_style'] === ORM::LIMIT_STYLE_TOP_N) {
            $fragment .= "TOP {$this->_limit} ";
        }
        if ($this->_distinct) {
            $result_columns = 'DISTINCT ' . $result_columns;
        }
        $fragment .= "{$result_columns} FROM " . $this->_quote_identifier($this->_table_name);
        if (!is_null($this->_table_alias)) {
            $fragment .= " " . $this->_quote_identifier($this->_table_alias);
        }
        return $fragment;
    }
ORM