lib/collection.js
function(db, namespace) {
    var collection = this;
    collection.trigger('request', collection);
    fetch(db, namespace, function(err, res) {
      if (err) {
        throw err;
      }
      collection.reset(res, {parse: true});
      collection.trigger('sync', collection);
    });
    return collection;
  }
function(db, namespace) {
    var collection = this;
    collection.trigger('request', collection);
    fetch(db, namespace, function(err, res) {
      if (err) {
        throw err;
      }
      collection.reset(res, {parse: true});
      collection.trigger('sync', collection);
    });
    return collection;
  }
function ( db , namespace ) { var collection = this ; collection . trigger ( 'request' , collection ) ; fetch ( db , namespace , function ( err , res ) { if ( err ) { throw err ; } collection . reset ( res , { parse : true } ) ; collection . trigger ( 'sync' , collection ) ; } ) ; return collection ; }
queries a MongoDB instance for index details and populates
IndexCollection with the indexes in `namespace`.

@param  {MongoClient} db     MongoDB driver db handle
@param  {String} namespace   namespace to get indexes from, e.g. `test.foo`
@return {IndexCollection}    collection of indexes on `namespace`
queries a MongoDB instance for index details and populates IndexCollection with the indexes in namespace .