This PR creates the BsonTypeInfo enum (as proposed here) and replaces all references to BSON information (such as type names, precisions, scales, etc) with references to variants of this new enum as a single source of information.
Note I did not implement the suggestion of using a flag to indicate whether the context is MongoSQL or MySQL. The refactor primarily focused on updating the MongoSQL* classes. The MySQL classes were updated but only to use the bson type names from the enum. Let me know if you think it is worth extending this further to fully update the MySQL classes as well. I'm not sure that would be worth the effort for a minimal win since, as I often come back to, the MySQL dialect will not be around in this iteration of the driver for long.
This is ready for another look. Note that some BSON_BSON-related comments resulted in no code changes, only new code comments! See the relevant threads on this PR for details.
This PR creates the
BsonTypeInfo
enum (as proposed here) and replaces all references to BSON information (such as type names, precisions, scales, etc) with references to variants of this new enum as a single source of information.Note I did not implement the suggestion of using a flag to indicate whether the context is MongoSQL or MySQL. The refactor primarily focused on updating the MongoSQL* classes. The MySQL classes were updated but only to use the bson type names from the enum. Let me know if you think it is worth extending this further to fully update the MySQL classes as well. I'm not sure that would be worth the effort for a minimal win since, as I often come back to, the MySQL dialect will not be around in this iteration of the driver for long.