starleaf1 starleaf1 - 7 days ago 4
Node.js Question

Which version of UUID does MySQL use?

I'm rewriting an old Node.js app that uses UUID. I decided to move the responsibility of generating UUID's to Node instead of MySQL's

UUID()
function.

The package I'm gonna use on Node is
uuid
, which has support for version 1, 4, and 5. For compatibility reason, I need to use the same version which is generated by MySQL's
UUID()
. Which one is it?

Answer

From docs:

UUID() returns a value that conforms to UUID version 1 as described in RFC 4122.