Documentation ¶
Index ¶
- type UUID
- func (u UUID) Bytes() []byte
- func (u UUID) CleanString() string
- func (u UUID) Encode(w *pgx.WriteBuf, oid pgx.Oid) error
- func (u UUID) FormatCode() int16
- func (u UUID) IsNull() bool
- func (u *UUID) ParseBytes(b []byte) (err error)
- func (u *UUID) ParseCleanString(s string) (err error)
- func (u *UUID) ParseString(s string) (err error)
- func (u *UUID) Scan(vr *pgx.ValueReader) error
- func (u UUID) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UUID ¶
type UUID [uuidLen]byte
UUID representation compliant with specification described in RFC 4122.
func FromCleanString ¶
FromCleanString creates a UUID object from given hex string in lower case without any additional chars.
uuid.FromCleanString("6ba7b8149dad11d180b400c04fd430c8")
func FromString ¶
FromString creates a UUID object from given hex string representation. Function accepts UUID string in following formats:
uuid.FromString("6ba7b814-9dad-11d1-80b4-00c04fd430c8")
func (UUID) CleanString ¶
CleanString returns clean string representation of UUID (without any additional chars and in lower case).
func (UUID) FormatCode ¶
FormatCode implements the pgx.Encoder interface.
func (*UUID) ParseBytes ¶
ParseBytes extract UUID from byte slice (as-is).
func (*UUID) ParseCleanString ¶
ParseCleanString extract UUID from clean string UUID representation (like "6ba7b8149dad11d180b400c04fd430c8").
func (*UUID) ParseString ¶
ParseString extract UUID from its standard string representation (like "6ba7b814-9dad-11d1-80b4-00c04fd430c8").