|SUBTYPE_GENERIC (0x00) is the default used by the driver (as of 0.46).|
|SUBTYPE_FUNCTION (0x01) is for compiled byte code.|
|SUBTYPE_GENERIC_DEPRECATED (0x02) is deprecated. It was used by the driver prior to version 0.46, but this subtype wastes 4 bytes of space so SUBTYPE_GENERIC is preferred. This is the only type that is parsed differently based on type.|
|SUBTYPE_UUID_DEPRECATED (0x03) is deprecated. It is for UUIDs.|
|SUBTYPE_UUID (0x04) is for UUIDs.|
|SUBTYPE_MD5 can be (0x05) is for MD5 hashes.|
|SUBTYPE_USER_DEFINED (0x80) is for user-defined binary types.|
If you have been using SUBTYPE_GENERIC_DEPRECATED for binary data, moving to SUBTYPE_GENERIC should be painless: just use the driver normally and all new/resaved data will be stored as SUBTYPE_GENERIC.
It gets a little trickier if youve been querying by binary data fields:
SUBTYPE_GENERIC wont match SUBTYPE_GENERIC_DEPRECATED, even if the data
itself is the same.
Why is CWSUBTYPE_UUID_DEPRECATED deprecated?
Other languages were using the UUID type to deserialize into their languages
native UUID type. They were doing this in different ways, so to standardize,
they decided on a deserialization format for everyone to use and changed the
subtype for UUID to the universal format.
This should not affect Perl users at all, as Perl does not deserialize it into any native UUID type.
o David Golden <email@example.com> o Mike Friedman <firstname.lastname@example.org> o Kristina Chodorow <email@example.com> o Florian Ragwitz <firstname.lastname@example.org>
This software is Copyright (c) 2016 by MongoDB, Inc..
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
|perl v5.20.3||MONGODB::BSON::BINARY (3)||2016-03-08|