Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Is snowflake generated ID can be bigger then unsigned_long? (2^64-1)

It’s a bit stupid question, but I don’t have enough relevant expirience to answer it myself.

Can a snowflake generated ID (274950720577339394), be bigger then unsigned_long type of integer? (2^64-1)

Just a bit more info. I’d like to store snowflake IDs inside the elasticsearch index, and according to it’s integer types there is a unsigned_long which I guess should perfectly fit, and store snowflake as a number. So doesn’t it a good idea? Or it’s safe to use keyword instead of int types?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

No, they can’t.

According to this post on Google Groups,

IDs will still be 64-bit unsigned integers

Note that this post was posted in 2010, which is a while ago, but it doesn’t seem it was changed.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading