diff options
Diffstat (limited to 'src/mongo/bson/bsontypes.cpp')
-rw-r--r-- | src/mongo/bson/bsontypes.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mongo/bson/bsontypes.cpp b/src/mongo/bson/bsontypes.cpp index b1f545ee180..a2dbcaaf334 100644 --- a/src/mongo/bson/bsontypes.cpp +++ b/src/mongo/bson/bsontypes.cpp @@ -127,4 +127,25 @@ bool isValidBSONType(int type) { } } +const char* typeName(BinDataType type) { + switch (type) { + case BinDataGeneral: + return "general"; + case Function: + return "function"; + case ByteArrayDeprecated: + return "byte(deprecated)"; + case bdtUUID: + return "UUID(deprecated)"; + case newUUID: + return "UUID"; + case MD5Type: + return "MD5"; + case bdtCustom: + return "Custom"; + default: + return "invalid"; + } +} + } // namespace mongo |