Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nanoid and ulid _id generation options #4700

Open
janl opened this issue Jul 25, 2023 · 5 comments
Open

Add nanoid and ulid _id generation options #4700

janl opened this issue Jul 25, 2023 · 5 comments

Comments

@janl
Copy link
Member

janl commented Jul 25, 2023

https://github.com/ulid/spec
https://github.com/ai/nanoid

@nickva
Copy link
Contributor

nickva commented Jul 25, 2023

Good idea, Jan.

There is a uuid7, too:

@pgj
Copy link
Contributor

pgj commented Jul 25, 2023

How would this look like in practice? Something like a configuration option where the user may choose with algorithm to use for generating the _id values?

@nickva
Copy link
Contributor

nickva commented Jul 25, 2023

We could pick the algorithm to use when a doc is created without an _id fields.

Also there is an API for users to generate block of UUIDs

That's mostly from the days when UUIDs libraries in clients weren't ubiquitous.

@janl
Copy link
Member Author

janl commented Jul 26, 2023

pgj commented 18 hours ago
How would this look like in practice? Something like a configuration option where the user may choose with algorithm to use for generating the _id values?

we already have that, I was hoping we can just add the new algos

@pgj
Copy link
Contributor

pgj commented Jul 26, 2023

Ah, I see. Thanks for the answers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants