     # This class represents the results of a query.
     #
     # If there is a profile, `profile` is set. After a 'ready' event,
-    # one of `error`, `value` or `cursor` is always set. `ended`
-    # indicates whether there are any more results to read.
+    # one of `error`, `value` or `cursor` is always set, `type`
+    # indicates which. `ended` indicates whether there are any more
+    # results to read.
     #
     # It triggers the following events:
     #  * ready: The first response has been received

                    callback error, result

        cursor_next: (cursor, {error, row, end}) =>
            @container.toggle_executing true
            cursor.next (err, row_) =>
                @container.toggle_executing false

        render: (args) =>
            # ATN many of these fields don't get updated when their value changes
            if @query_result?.ready
                @view_object?.$el.detach()
                has_more_data = not @query_result.ended and @query_result.position + @container.limit <= @query_result.size()
                @$el.html @template
                    limit_value: @container.limit
                    skip_value: @query_result.position
                    execution_time: 12345 # ATN
                    query: "query" # ATN
                    query_has_changed: args?.query_has_changed
                    show_more_data: has_more_data and not @container.state.cursor_timed_out
                    cursor_timed_out_template: (
                        @cursor_timed_out_template() if not @query_result.ended and @container.state.cursor_timed_out)
                    execution_time_pretty: 12345 # @ATN_metadata.execution_time_pretty
