<commit_before><?php
namespace Atlas\Model;

use Atlas\Database as Database;

abstract class Query
{
    /**
     * @var Atlas\Database\Select
     */
    protected $_select;

    /**
     * @var Atlas\Mapper
     */
    protected $_mapper;

    protected $_adapter;
    
    public function __construct($adapter, $mapper, $select)
    {
        $this->_adapter = $adapter;
        $this->_mapper = $mapper;
        $this->_select = $select;
    }
 
    /**
     * @param int $count
     * @param int $offset
     * @return Atom\Model\Query
     */
    public function limit($count, $offset = null)
    {
        $this->_select()->limit($count, $offset);
        return $this;
    }

    /**
     *
     * @param string|array $spec
     * @return Atom\Model\Query
     */
    public function sort($spec)
    {
        $this->_select()->order($spec);
        return $this;
    }

    /**
     * Get the select object to add to the statement. 
     * Not exposed to user land
     * @return Atlas\Database\Sql\Select
     */ 
    protected function _select()
    {
        return $this->_select;
    }

    /**
     * Get the SQL template string for debugging queries 
     * @return string 
     */ 
    public function toString()
    {
        return $this->_select()->assemble();
    }

    /**
     * Get the fetch object to handle the various fetch strategies
     * @return Atlas\Database\Fetch 
     */ 
    public function fetch()
    {
        return new Database\Fetch(
            $this->_adapter, $this->_mapper, $this->_select
        );
    }
}<commit_msg>Fixed incorrect reference to Fetch namespace<commit_after><?php
namespace Atlas\Model;

use Atlas\Database as Database;

abstract class Query
{
    /**
     * @var Atlas\Database\Sql\Select
     */
    protected $_select;

    /**
     * @var Atlas\Model\Mapper
     */
    protected $_mapper;

    protected $_adapter;
    
    public function __construct($adapter, $mapper, $select)
    {
        $this->_adapter = $adapter;
        $this->_mapper = $mapper;
        $this->_select = $select;
    }
 
    /**
     * @param int $count
     * @param int $offset
     * @return Atom\Model\Query
     */
    public function limit($count, $offset = null)
    {
        $this->_select()->limit($count, $offset);
        return $this;
    }

    /**
     *
     * @param string|array $spec
     * @return Atom\Model\Query
     */
    public function sort($spec)
    {
        $this->_select()->order($spec);
        return $this;
    }

    /**
     * Get the select object to add to the statement. 
     * Not exposed to user land
     * @return Atlas\Database\Sql\Select
     */ 
    protected function _select()
    {
        return $this->_select;
    }

    /**
     * Get the SQL template string for debugging queries 
     * @return string 
     */ 
    public function toString()
    {
        return $this->_select()->assemble();
    }

    /**
     * Get the fetch object to handle the various fetch strategies
     * @return Atlas\Database\Fetch 
     */ 
    public function fetch()
    {
        return new Database\Sql\Fetch(
            $this->_adapter, $this->_mapper, $this->_select
        );
    }
}
{'fraction_non_alphanumeric': 0.12857591952216285, 'fraction_numerical': 0.0, 'mean_word_length': 1.8692515779981966, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4301049', 'n_tokens_mistral': 949, 'n_tokens_neox': 907, 'n_words': 237}