# Code coverage report for node-mongoskin/lib/cursor.js

## Statements: 90% (9 / 10) Branches: 50% (1 / 2) Functions: 100% (2 / 2) Lines: 100% (9 / 9) Ignored: none

All files » node-mongoskin/lib/ » cursor.js

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34

    1
    1

    1

    1
    10
    10
    10
    10
    10

     /*!
     * mongoskin - cursor.js
     *
     * Copyright(c) 2011 - 2012 kissjs.org
     * MIT Licensed
     */

    "use strict";

    /**
     * Module dependencies.
     */

    var Cursor = require('mongodb').Cursor;
    var utils = require('./utils');

    var SkinCursor = exports.SkinCursor = utils.makeSkinClass(Cursor);

    /**
     * Retrieve mongodb.Cursor instance.
     *
     * @param {Function(err, cursor)} callback
     * @return {SkinCursor} this
     * @api public
     */
    SkinCursor.prototype._open = function (callback) {
      var self = this;
      this._skin_collection.open(function (err, collection) {
          Iif (err) return callback(err);
          var args = self._find_args.concat([callback]);
          collection.find.apply(collection, args);
      });
    };