Skip to content

Conversation

@AngusDV
Copy link

@AngusDV AngusDV commented Aug 11, 2024

This commit adds the following helper functions:

  1. mongodb_uuid($value): Converts a UUID string to a MongoDB BSON Binary object.
  2. mongodb_uuid_to_string($uuid): Converts a MongoDB BSON Binary object representing a UUID to a string.
  3. mongodb_uuid_generate(): Generates a new UUID and returns it as a MongoDB BSON Binary object.

These functions simplify the process of working with UUID data in a MongoDB database using the Ramsey/Uuid and MongoDB/BSON libraries.

This commit adds the following helper functions:

1. `mongodb_uuid($value)`: Converts a UUID string to a MongoDB BSON Binary object.
2. `mongodb_uuid_to_string($uuid)`: Converts a MongoDB BSON Binary object representing a UUID to a string.
3. `mongodb_uuid_generate()`: Generates a new UUID and returns it as a MongoDB BSON Binary object.

These functions simplify the process of working with UUID data in a MongoDB database using the Ramsey/Uuid and MongoDB/BSON libraries.
@AngusDV AngusDV requested a review from ramsey as a code owner August 11, 2024 07:06
@ramsey
Copy link
Owner

ramsey commented Aug 20, 2024

Thanks for contributing these functions. Since they’re specific to MongoDB, I think it’d be better to create a separate package for them. What do you think?

@AngusDV
Copy link
Author

AngusDV commented Aug 21, 2024 via email

@ramsey
Copy link
Owner

ramsey commented May 25, 2025

Closing this, since these helper methods that are specific to MongoDB should be in a separate package.

@ramsey ramsey closed this May 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants