nulluuid

package
v0.0.0-...-4e88d6b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2016 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UUID

type UUID struct {
	UUID  uuid.UUID
	Valid bool // Valid is true if UUID is not NULL
}

UUID represent UUID that may be NULL. UUID implements the pgx.Scanner and pgx.Encoder interfaces.

func FromUUID

func FromUUID(u uuid.UUID) UUID

FromUUID construct nullable UUID from given UUID.

func Null

func Null() UUID

Null construct invalid UUID.

func (UUID) Encode

func (u UUID) Encode(w *pgx.WriteBuf, oid pgx.Oid) error

Encode implements the pgx.Encoder interface.

func (UUID) FormatCode

func (u UUID) FormatCode() int16

FormatCode implements the pgx.Encoder interface.

func (*UUID) Scan

func (u *UUID) Scan(vr *pgx.ValueReader) error

Scan implements the pgx.Scanner interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL