Was this page helpful?
Caution
You're viewing documentation for an unstable version of ScyllaDB Node.js Driver. Switch to the latest stable version.
Uuid¶
types~Uuid(buffer)
Represents an immutable universally unique identifier (UUID). A UUID represents a 128-bit value.
Constructor¶
new Uuid(buffer)
Creates a new instance of Uuid based on a Buffer
Parameters:
| Name | Type | Description |
|---|---|---|
buffer |
The 16-length buffer. |
Source
Members¶
(readonly) buffer
Returns the underlying buffer
Source
uuidRegex
Used to check if the UUID is in a correct format Source: https://stackoverflow.com/a/6640851 Verified also with documentation of UUID library in Rust: https://docs.rs/uuid/latest/uuid/
Source
Methods¶
equals(other)
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.
Parameters:
| Name | Type | Description |
|---|---|---|
other |
The other value to test for equality. |
Source
getBuffer()
Gets the bytes representation of a Uuid
Source
getInternal()
Source
inspect()
Provide the name of the constructor and the string representation
Source
toJSON()
Returns the string representation. Method used by the native JSON.stringify() to serialize this instance.
Source
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.
Source
(static) fromRust()
Source
(static) fromString()
Parses a string representation of a Uuid
Source
(static) random(callback)
Creates a new random (version 4) Uuid.
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
Optional callback to be invoked with the error as first parameter and the created Uuid as second parameter. |
Source