File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,31 @@ Replica Set Member State Restriction
112112
113113.. |operations| replace:: :dbcommand:`collStats`
114114
115+ Non-Existent Collections
116+ ~~~~~~~~~~~~~~~~~~~~~~~~
117+
118+ If you run :dbcommand:`collStats` for a non-existent collection, then
119+ depending on your database implementation, :dbcommand:`collStats` might
120+ return ``0`` values in the output fields instead of returning an error.
121+
122+ For example:
123+
124+ .. code-block:: javascript
125+
126+ db.runCommand( { collStats : "nonExistentCollection" } )
127+
128+ Example output with ``0`` values in the fields:
129+
130+ .. code-block:: javascript
131+ :copyable: false
132+
133+ {
134+ ns: 'test.nonExistentCollection',
135+ size: 0,
136+ count: 0,
137+ ...
138+ }
139+
115140Example
116141-------
117142
You can’t perform that action at this time.
0 commit comments