couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robertkowalski <...@git.apache.org>
Subject [GitHub] couchdb pull request: Implement bulk deletion for all-docs-listing
Date Sun, 18 May 2014 12:33:27 GMT
Github user robertkowalski commented on a diff in the pull request:

    https://github.com/apache/couchdb/pull/221#discussion_r12773456
  
    --- Diff: src/fauxton/app/addons/documents/views.js ---
    @@ -610,48 +663,17 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
           this.render();
         },
     
    -    /*
    -     * TODO: this should be reconsidered
    -     * This currently performs delete operations on the model level,
    -     * when we could be using bulk docs with _deleted = true. Using
    -     * individual models is cleaner from a backbone standpoint, but
    -     * not from the couchdb api.
    -     * Also, the delete method is naive and leaves the body intact,
    -     * when we should switch the doc to only having id/rev/deleted.
    -     */
         bulkDelete: function() {
    -      var that = this;
    -      // yuck, data binding ftw?
    -      var eles = this.$el.find("input.row-select:checked")
    -                         .parents("tr.all-docs-item")
    -                         .map(function(e) { return $(this).attr("data-id"); })
    -                         .get();
    +      var that = this,
    +          documents = this.bulkDeleteDocsCollection.toArray(),
    --- End diff --
    
    good point!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message