diff options
author | Robert Guo <robert.guo@10gen.com> | 2016-04-04 12:52:48 -0400 |
---|---|---|
committer | Robert Guo <robert.guo@10gen.com> | 2016-04-12 11:05:22 -0400 |
commit | 89a3de326d0e6a999149e7eca5fbab5c77f559b6 (patch) | |
tree | b8116468ace7bad7660bff1a4bef38f74d9cd717 /src/mongo/db/namespace_string.h | |
parent | 3caa06819ab544bf9e88f4413c363a6439fe1998 (diff) | |
download | mongo-89a3de326d0e6a999149e7eca5fbab5c77f559b6.tar.gz |
SERVER-23297 consolidate namespace validation
Diffstat (limited to 'src/mongo/db/namespace_string.h')
-rw-r--r-- | src/mongo/db/namespace_string.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mongo/db/namespace_string.h b/src/mongo/db/namespace_string.h index 65d23736dee..651c5fc830e 100644 --- a/src/mongo/db/namespace_string.h +++ b/src/mongo/db/namespace_string.h @@ -161,6 +161,12 @@ public: bool isNormal() const { return normal(_ns); } + + // Check if the NamespaceString references a special collection that cannot + // be used for generic data storage. + bool isVirtualized() const { + return virtualized(_ns); + } bool isListCollectionsCursorNS() const; bool isListIndexesCursorNS() const; @@ -227,6 +233,10 @@ public: static bool special(StringData ns); + // Check if `ns` references a special collection that cannot be used for + // generic data storage. + static bool virtualized(StringData ns); + /** * Returns true for DBs with special meaning to mongodb. */ |