Starting with version 4.9, the Apache Software Foundation owns and maintains the NodeJS driver. For the latest version, visit github.com/apache/cassandra-nodejs-driver
Creates a new instance of Uuid based on the parameters provided according to rfc4122.
If any of the arguments is not provided, it will be randomly generated, except for the date that will use the current
date.
Note that when nodeId and/or clockId portions are not provided, the constructor will generate them using
crypto.randomBytes(). As it’s possible that crypto.randomBytes() might block, it’s
recommended that you use the callback-based version of the static methods fromDate() or
now() in that case.
A number from 0 to 10000 representing the 100-nanoseconds units for this instance to fill in the information not available in the Date,
as Ecmascript Dates have only milliseconds precision.
A 2-length Buffer or string of 6 ascii characters representing the clock identifier.
Methods
equals
(Uuidother)
Compares this object to the specified object.
The result is true if and only if the argument is not null, is a UUID object, and contains the same value, bit for bit, as this UUID.
A number from 0 to 10000 representing the 100-nanoseconds units for this instance to fill in the information not available in the Date,
as Ecmascript Dates have only milliseconds precision.
An optional callback to be invoked with the error as first parameter and the created
TimeUuid as second parameter. When a callback is provided, the random portions of the
TimeUuid instance are created asynchronously.
When nodeId and/or clockId portions are not provided, this method will generate them using
crypto.randomBytes(). As it’s possible that crypto.randomBytes() might block, it’s
recommended that you use the callback-based version of this method in that case.
An optional callback to be invoked with the error as first parameter and the created
TimeUuid as second parameter. When a callback is provided, the random portions of the
TimeUuid instance are created asynchronously.
When nodeId and/or clockId portions are not provided, this method will generate them using
crypto.randomBytes(). As it’s possible that crypto.randomBytes() might block, it’s
recommended that you use the callback-based version of this method in that case.
toJSON
()
Returns the string representation.
Method used by the native JSON.stringify() to serialize this instance.
toString
()
Returns a string representation of the value of this Uuid instance.
32 hex separated by hyphens, in the form of 00000000-0000-0000-0000-000000000000.