<commit_before>class Lanes.Models.Query.CollectionResult

    constructor: (@query) ->
        @collection.on('add remove reset', =>
            @query.trigger('change')
        )
        this

    rowAt: (index, options = {}) ->
        model = @collection.at(index)
        for field, i in @query.fields.models
            model[field.id]

    allRows: (options) ->
        rows = (@rowAt(i, options) for i in [0...@length])
        _.Promise.resolve(rows)

    modelAt: (index) ->
        @collection.at(index)

    saveModelChanges: (model, index) ->
        @collection.at(index).copyFrom(model)

    addBlankRow: (index) ->
        @collection.add({}, at: index)
<commit_msg>change event needs model as argument<commit_after>class Lanes.Models.Query.CollectionResult

    constructor: (@query) ->
        @collection.on('add remove reset', =>
            @query.trigger('change', @query)
        )
        this

    rowAt: (index, options = {}) ->
        model = @collection.at(index)
        for field, i in @query.fields.models
            model[field.id]

    allRows: (options) ->
        rows = (@rowAt(i, options) for i in [0...@length])
        _.Promise.resolve(rows)

    modelAt: (index) ->
        @collection.at(index)

    saveModelChanges: (model, index) ->
        @collection.at(index).copyFrom(model)

    addBlankRow: (index) ->
        @collection.add({}, at: index)

{'fraction_non_alphanumeric': 0.15218951902368988, 'fraction_numerical': 0.0014357501794687725, 'mean_word_length': 2.234338747099768, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, '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': '4932802', 'n_tokens_mistral': 429, 'n_tokens_neox': 418, 'n_words': 90}