@@ -58,7 +58,7 @@ var Admin = function(db, topology, promiseLibrary) {
58
58
* @param {object } [options=null] Optional settings.
59
59
* @param {(ReadPreference|string) } [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
60
60
* @param {number } [options.maxTimeMS=null] Number of milliseconds to wait before aborting the query.
61
- * @param {Admin~resultCallback } callback The command result callback
61
+ * @param {Admin~resultCallback } [ callback] The command result callback
62
62
* @return {Promise } returns Promise if no callback passed
63
63
*/
64
64
Admin . prototype . command = function ( command , options , callback ) {
@@ -87,7 +87,7 @@ Admin.prototype.command = function(command, options, callback) {
87
87
* Retrieve the server information for the current
88
88
* instance of the db client
89
89
*
90
- * @param {Admin~resultCallback } callback The command result callback
90
+ * @param {Admin~resultCallback } [ callback] The command result callback
91
91
* @return {Promise } returns Promise if no callback passed
92
92
*/
93
93
Admin . prototype . buildInfo = function ( callback ) {
@@ -108,7 +108,7 @@ Admin.prototype.buildInfo = function(callback) {
108
108
* Retrieve the server information for the current
109
109
* instance of the db client
110
110
*
111
- * @param {Admin~resultCallback } callback The command result callback
111
+ * @param {Admin~resultCallback } [ callback] The command result callback
112
112
* @return {Promise } returns Promise if no callback passed
113
113
*/
114
114
Admin . prototype . serverInfo = function ( callback ) {
@@ -131,7 +131,7 @@ Admin.prototype.serverInfo = function(callback) {
131
131
/**
132
132
* Retrieve this db's server status.
133
133
*
134
- * @param {Admin~resultCallback } callback The command result callback
134
+ * @param {Admin~resultCallback } [ callback] The command result callback
135
135
* @return {Promise } returns Promise if no callback passed
136
136
*/
137
137
Admin . prototype . serverStatus = function ( callback ) {
@@ -163,7 +163,7 @@ var serverStatus = function(self, callback) {
163
163
/**
164
164
* Retrieve the current profiling Level for MongoDB
165
165
*
166
- * @param {Admin~resultCallback } callback The command result callback
166
+ * @param {Admin~resultCallback } [ callback] The command result callback
167
167
* @return {Promise } returns Promise if no callback passed
168
168
*/
169
169
Admin . prototype . profilingLevel = function ( callback ) {
@@ -200,7 +200,7 @@ var profilingLevel = function(self, callback) {
200
200
/**
201
201
* Ping the MongoDB server and retrieve results
202
202
*
203
- * @param {Admin~resultCallback } callback The command result callback
203
+ * @param {Admin~resultCallback } [ callback] The command result callback
204
204
* @return {Promise } returns Promise if no callback passed
205
205
*/
206
206
Admin . prototype . ping = function ( options , callback ) {
@@ -226,7 +226,7 @@ Admin.prototype.ping = function(options, callback) {
226
226
* @method
227
227
* @param {string } username The username.
228
228
* @param {string } [password] The password.
229
- * @param {Admin~resultCallback } callback The command result callback
229
+ * @param {Admin~resultCallback } [ callback] The command result callback
230
230
* @return {Promise } returns Promise if no callback passed
231
231
*/
232
232
Admin . prototype . authenticate = function ( username , password , callback ) {
@@ -246,7 +246,7 @@ Admin.prototype.authenticate = function(username, password, callback) {
246
246
/**
247
247
* Logout user from server, fire off on all connections and remove all auth info
248
248
* @method
249
- * @param {Admin~resultCallback } callback The command result callback
249
+ * @param {Admin~resultCallback } [ callback] The command result callback
250
250
* @return {Promise } returns Promise if no callback passed
251
251
*/
252
252
Admin . prototype . logout = function ( callback ) {
@@ -296,7 +296,7 @@ var writeConcern = function(options, db) {
296
296
* @param {boolean } [options.fsync=false] Specify a file sync write concern.
297
297
* @param {object } [options.customData=null] Custom data associated with the user (only Mongodb 2.6 or higher)
298
298
* @param {object[] } [options.roles=null] Roles associated with the created user (only Mongodb 2.6 or higher)
299
- * @param {Admin~resultCallback } callback The command result callback
299
+ * @param {Admin~resultCallback } [ callback] The command result callback
300
300
* @return {Promise } returns Promise if no callback passed
301
301
*/
302
302
Admin . prototype . addUser = function ( username , password , options , callback ) {
@@ -333,7 +333,7 @@ Admin.prototype.addUser = function(username, password, options, callback) {
333
333
* @param {number } [options.wtimeout=null] The write concern timeout.
334
334
* @param {boolean } [options.j=false] Specify a journal write concern.
335
335
* @param {boolean } [options.fsync=false] Specify a file sync write concern.
336
- * @param {Admin~resultCallback } callback The command result callback
336
+ * @param {Admin~resultCallback } [ callback] The command result callback
337
337
* @return {Promise } returns Promise if no callback passed
338
338
*/
339
339
Admin . prototype . removeUser = function ( username , options , callback ) {
@@ -365,7 +365,7 @@ Admin.prototype.removeUser = function(username, options, callback) {
365
365
* Set the current profiling level of MongoDB
366
366
*
367
367
* @param {string } level The new profiling level (off, slow_only, all).
368
- * @param {Admin~resultCallback } callback The command result callback.
368
+ * @param {Admin~resultCallback } [ callback] The command result callback.
369
369
* @return {Promise } returns Promise if no callback passed
370
370
*/
371
371
Admin . prototype . setProfilingLevel = function ( level , callback ) {
@@ -412,7 +412,7 @@ var setProfilingLevel = function(self, level, callback) {
412
412
/**
413
413
* Retrive the current profiling information for MongoDB
414
414
*
415
- * @param {Admin~resultCallback } callback The command result callback.
415
+ * @param {Admin~resultCallback } [ callback] The command result callback.
416
416
* @return {Promise } returns Promise if no callback passed
417
417
*/
418
418
Admin . prototype . profilingInfo = function ( callback ) {
@@ -443,7 +443,7 @@ var profilingInfo = function(self, callback) {
443
443
*
444
444
* @param {string } collectionName The name of the collection to validate.
445
445
* @param {object } [options=null] Optional settings.
446
- * @param {Admin~resultCallback } callback The command result callback.
446
+ * @param {Admin~resultCallback } [ callback] The command result callback.
447
447
* @return {Promise } returns Promise if no callback passed
448
448
*/
449
449
Admin . prototype . validateCollection = function ( collectionName , options , callback ) {
@@ -497,7 +497,7 @@ var validateCollection = function(self, collectionName, options, callback) {
497
497
/**
498
498
* List the available databases
499
499
*
500
- * @param {Admin~resultCallback } callback The command result callback.
500
+ * @param {Admin~resultCallback } [ callback] The command result callback.
501
501
* @return {Promise } returns Promise if no callback passed
502
502
*/
503
503
Admin . prototype . listDatabases = function ( callback ) {
@@ -517,7 +517,7 @@ Admin.prototype.listDatabases = function(callback) {
517
517
/**
518
518
* Get ReplicaSet status
519
519
*
520
- * @param {Admin~resultCallback } callback The command result callback.
520
+ * @param {Admin~resultCallback } [ callback] The command result callback.
521
521
* @return {Promise } returns Promise if no callback passed
522
522
*/
523
523
Admin . prototype . replSetGetStatus = function ( callback ) {
0 commit comments