| Age | Commit message (Collapse) | Author |
|
Per RFC 9562 Section 5.9,
A Nil UUID value can be useful to communicate the absence of any
other UUID value in situations that otherwise require or use a
128-bit UUID.
A Nil UUID can express the concept "no such value here".
Thus, it is reserved for such use as needed for
implementation-specific situations.
In case of SQL, the Value method should return nil if ID is zero.
|
|
|
|
Using Func suffix to function variable is common coding styles in Go.
|
|
Adding suffix version to the type seems not right (and also mouthful to
read) since the package already defines the version of UUID.
|
|
This is to simplify checking for equality in if-condition.
|
|
If the UUID value being unmarshaled or scanned is not valid, don't changes
the current value.
|
|
Column with NULL value will returns no error but zero UUID.
|
|
The Value method returns the value for sending it to the
database.
|
|
The Equal method returns nil if both receiver and parameter has
the same value.
This method implements [lib/reflect.Equaler] interface.
|
|
The uuidv7 package provides type UUIDv7 as the container for UUID
version 7 that satisfy the [database/sql], [encoding/gob], and
[encoding/json].
The implementation follow RFC 9562.
|