|
enum | MaxNsLenValue |
| Note that these values are derived from the mmap_v1 implementation and that is the only reason they are constrained as such.
|
|
mongo::NamespaceString::NamespaceString |
( |
const StringData & |
dbName, |
|
|
const StringData & |
collectionName |
|
) |
| |
|
inline |
Constructs a NamespaceString for the given database and collection names.
"dbName" must not contain a ".", and "collectionName" must not start with one.
bool mongo::NamespaceString::isValid |
( |
| ) |
const |
|
inline |
- Returns
- true if the namespace is valid. Special namespaces for internal use are considered as valid.
bool mongo::NamespaceString::normal |
( |
const StringData & |
ns | ) |
|
|
inlinestatic |
- Returns
- true if ns is 'normal'. A "$" is used for namespaces holding index data, which do not contain BSON objects in their records. ("oplog.$main" is the exception)
bool mongo::NamespaceString::oplog |
( |
const StringData & |
ns | ) |
|
|
inlinestatic |
- Returns
- true if the ns is an oplog one, otherwise false.
bool mongo::NamespaceString::validCollectionComponent |
( |
const StringData & |
ns | ) |
|
|
inlinestatic |
Takes a fully qualified namespace (ie dbname.collectionName), and returns true if the collection name component of the namespace is valid.
samples: good: foo.bar bad: foo.
- Parameters
-
ns | - a full namespace (a.b) |
- Returns
- if db.coll is an allowed collection name
bool mongo::NamespaceString::validCollectionName |
( |
const StringData & |
coll | ) |
|
|
inlinestatic |
Takes a collection name and returns true if it is a valid collection name.
samples: good: foo system.indexes bad: $foo
- Parameters
-
coll | - a collection name component of a namespace |
- Returns
- if the input is a valid collection name
bool mongo::NamespaceString::validDBName |
( |
const StringData & |
dbin | ) |
|
|
inlinestatic |
samples: good foo bar foo-bar bad: foo bar foo.bar foo"bar
- Parameters
-
db | - a possible database name |
- Returns
- if db is an allowed database name
The documentation for this class was generated from the following files: