documentclientwrapper.js
function(sprocLink, params, options) {
            var deferred = Q.defer();
            this._innerDocumentclient.executeStoredProcedure(sprocLink, params, options, function (error, result, responseHeaders) {
                if (error) {
                    addOrMergeHeadersForError(error, responseHeaders);
                    deferred.reject(error);
                } else {
                    deferred.resolve({result: result, headers: responseHeaders});
                }
            });
            return deferred.promise;
        }
function(sprocLink, params, options) {
            var deferred = Q.defer();
            this._innerDocumentclient.executeStoredProcedure(sprocLink, params, options, function (error, result, responseHeaders) {
                if (error) {
                    addOrMergeHeadersForError(error, responseHeaders);
                    deferred.reject(error);
                } else {
                    deferred.resolve({result: result, headers: responseHeaders});
                }
            });
            return deferred.promise;
        }
function ( sprocLink , params , options ) { var deferred = Q . defer ( ) ; this . _innerDocumentclient . executeStoredProcedure ( sprocLink , params , options , function ( error , result , responseHeaders ) { if ( error ) { addOrMergeHeadersForError ( error , responseHeaders ) ; deferred . reject ( error ) ; } else { deferred . resolve ( { result : result , headers : responseHeaders } ) ; } } ) ; return deferred . promise ; }
Execute the StoredProcedure represented by the object.
@memberof DocumentClientWrapper
@instance
@param {string} sprocLink                - The self-link of the stored procedure.
@param {Array} [params]                  - Represent the parameters of the stored procedure.
@param {Object} [options]                - options for executing the stored procedure
@param {Object} [options.partitionKey]   - partition key value if executing against a partitioned collection
@Returns {Object} <p>A promise object for the request completion. <br>
The onFulfilled callback takes a parameter of type {@link Response} and the OnError callback takes a parameter of type {@link ResponseError}</p>
Execute the StoredProcedure represented by the object .