3 var setProperty = require('../connection/utils').setProperty
4 , getProperty = require('../connection/utils').getProperty
5 , getSingleProperty = require('../connection/utils').getSingleProperty;
8 * Creates a new CommandResult instance
10 * @param {object} result CommandResult object
11 * @param {Connection} connection A connection instance associated with this result
12 * @return {CommandResult} A cursor instance
14 var CommandResult = function(result, connection, message) {
16 this.connection = connection;
17 this.message = message;
21 * Convert CommandResult to JSON
25 CommandResult.prototype.toJSON = function() {
30 * Convert CommandResult to String representation
34 CommandResult.prototype.toString = function() {
35 return JSON.stringify(this.toJSON());
38 module.exports = CommandResult;