diff options
author | Andrew Morrow <acm@10gen.com> | 2013-10-11 10:11:08 -0400 |
---|---|---|
committer | Andrew Morrow <acm@10gen.com> | 2013-10-11 12:34:47 -0400 |
commit | bfead9163f1cd1ca06d7c358a93fedbe48e9f512 (patch) | |
tree | ae4f566cfabd4584df5918de87c4d047738bee81 /src/mongo/db/field_ref.h | |
parent | f3e324f10697bd4f0c9bdebced4a1e69d91cdd89 (diff) | |
download | mongo-bfead9163f1cd1ca06d7c358a93fedbe48e9f512.tar.gz |
SERVER-7379 Prohibit shard key mutation in updates
Diffstat (limited to 'src/mongo/db/field_ref.h')
-rw-r--r-- | src/mongo/db/field_ref.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mongo/db/field_ref.h b/src/mongo/db/field_ref.h index 06e60c2c165..6f68f019126 100644 --- a/src/mongo/db/field_ref.h +++ b/src/mongo/db/field_ref.h @@ -117,6 +117,8 @@ namespace mongo { */ size_t numParts() const { return _size; } + bool empty() const { return numParts() == 0; } + private: // Dotted fields are most often not longer than four parts. We use a mixed structure // here that will not require any extra memory allocation when that is the case. And |