This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Javascript helper functions for parsing and displaying UUIDs in the MongoDB shell. | |
// This is a temporary solution until SERVER-3153 is implemented. | |
// To create BinData values corresponding to the various driver encodings use: | |
// var s = "{00112233-4455-6677-8899-aabbccddeeff}"; | |
// var uuid = UUID(s); // new Standard encoding | |
// var juuid = JUUID(s); // JavaLegacy encoding | |
// var csuuid = CSUUID(s); // CSharpLegacy encoding | |
// var pyuuid = PYUUID(s); // PythonLegacy encoding | |
// To convert the various BinData values back to human readable UUIDs use: | |
// uuid.toUUID() => 'UUID("00112233-4455-6677-8899-aabbccddeeff")' |