<commit_before>var Promise = require('bluebird');

function Query(model, query, type) {
    this._model = model; // constructor
    this._r = model._getModel()._thinky.r;

    if (query != null) {
        this._query = query;
        this._type = type || 'value'
    }
    else {
        this._query = this._r.table(model.getName());
        this._type = type || 'sequence'
    }
}


Query.prototype.setType = function(type) {
    //TODO Test
    this._type = type;
}

//TODO refactor run and execute
//TODO pass the groupFormat 'raw'
Query.prototype.run = function() {<commit_msg>Remove internal type<commit_after>var Promise = require('bluebird');

function Query(model, query, type) {
    this._model = model; // constructor
    this._r = model._getModel()._thinky.r;

    if (query != null) {
        this._query = query;
    }
    else {
        this._query = this._r.table(model.getName());
    }
}

//TODO refactor run and execute
//TODO pass the groupFormat 'raw'
Query.prototype.run = function() {
{'fraction_non_alphanumeric': 0.14512922465208747, 'fraction_numerical': 0.0, 'mean_word_length': 2.72962962962963, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6833015', 'n_tokens_mistral': 320, 'n_tokens_neox': 316, 'n_words': 78}