<commit_before>var querystring = require('querystring'),
    Args = require('vargs').Constructor,
    cradle = require('../../cradle'),
    Database = require('./index').Database;

Database.prototype.all = function (options, callback) {
    if (arguments.length === 1) { 
      callback = options; 
      options = {};
    }
    
    return this.query({
        method: 'GET', 
        path: '/_all_docs', 
        query: options
    }, callback);<commit_msg>[fix] Update `Database.prototype.all` to take a `body` parameter. Fixes #136<commit_after>var querystring = require('querystring'),
    Args = require('vargs').Constructor,
    cradle = require('../../cradle'),
    Database = require('./index').Database;

Database.prototype.all = function (options, callback) {
    if (arguments.length === 1) { 
      callback = options; 
      options = {};
    }
    
    if (options && options.body) {
        body = options.body;
        delete options.body;
        
        return this.query({
            method: 'POST', 
            path: '/_all_docs', 
            query: options,
            body: body
        }, callback);
    }
    else {
        return this.query({
            method: 'GET', 
            path: '/_all_docs', 
            query: options
        }, callback);
    }    
{'fraction_non_alphanumeric': 0.14926527455529776, 'fraction_numerical': 0.0038669760247486465, 'mean_word_length': 1.9884526558891455, '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': '104375', 'n_tokens_mistral': 374, 'n_tokens_neox': 354, 'n_words': 83}