Documentation ¶
Index ¶
- Variables
- type BigInt
- func (bi *BigInt) Cmp(a *BigInt) int
- func (bi *BigInt) IsZero() bool
- func (bi BigInt) MarshalJSON() ([]byte, error)
- func (bi *BigInt) Scan(value interface{}) error
- func (bi *BigInt) SetUint64(val uint64) *BigInt
- func (bi *BigInt) UnmarshalJSON(data []byte) error
- func (bi *BigInt) Value() (driver.Value, error)
- type ByteArray
- type Database
- type DuplicateError
- type NotFoundError
- type NotificationCallback
- type NotificationName
- type TimeZone
- func (tz TimeZone) Equal(tzb TimeZone) bool
- func (tz TimeZone) MarshalJSON() ([]byte, error)
- func (tz *TimeZone) Parse(s string) error
- func (tz *TimeZone) Scan(value interface{}) error
- func (tz TimeZone) String() string
- func (tz *TimeZone) UnmarshalJSON(data []byte) error
- func (tz TimeZone) Value() (driver.Value, error)
- type Timestamp
- type ValidationError
- type ZeroRowsError
Constants ¶
This section is empty.
Variables ¶
var ( ErrDuplicate = DuplicateError("duplicate") ErrNotFound = NotFoundError("not found") ErrValidation = ValidationError("validation") )
Functions ¶
This section is empty.
Types ¶
type BigInt ¶
BigInt is a large integer data type that corresponds to a NUMERIC in a database.
func NewBigIntZero ¶
func NewBigIntZero() *BigInt
func (BigInt) MarshalJSON ¶
func (*BigInt) UnmarshalJSON ¶
type ByteArray ¶
type ByteArray []byte
ByteArray is a type that corresponds to BYTEA in a database. It supports marshalling and unmarshalling from JSON, as well as implementing the sql.Scanner interface with NULL handling.
func (ByteArray) MarshalJSON ¶
func (*ByteArray) UnmarshalJSON ¶
type Database ¶
type Database interface { Close() error // Close database // SQL RegisterNotification(context.Context, NotificationName, NotificationCallback, any) error UnregisterNotification(NotificationName) error }
type DuplicateError ¶
type DuplicateError string
func (DuplicateError) Error ¶
func (de DuplicateError) Error() string
func (DuplicateError) Is ¶
func (de DuplicateError) Is(target error) bool
type NotFoundError ¶
type NotFoundError string
func (NotFoundError) Error ¶
func (nfe NotFoundError) Error() string
func (NotFoundError) Is ¶
func (nfe NotFoundError) Is(target error) bool
type NotificationCallback ¶
NotificationCallback is a callback function for a database notification.
type NotificationName ¶
type NotificationName string
NotificationName identifies a database notification type.
type TimeZone ¶
type TimeZone struct {
// contains filtered or unexported fields
}
TimeZone is a type that encodes to and decodes from a +/-hh:mm string.
func (TimeZone) MarshalJSON ¶
func (*TimeZone) UnmarshalJSON ¶
type Timestamp ¶
Timestamp is a type that corresponds to a TIMESTAMP in a database. It supports marshalling and unmarshalling from JSON, as well as implementing the sql.Scanner interface with NULL handling.
func NewTimestamp ¶
func (Timestamp) MarshalJSON ¶
func (*Timestamp) UnmarshalJSON ¶
type ValidationError ¶
type ValidationError string
func (ValidationError) Error ¶
func (ve ValidationError) Error() string
func (ValidationError) Is ¶
func (ve ValidationError) Is(target error) bool
type ZeroRowsError ¶ added in v0.1.1
type ZeroRowsError string
func (ZeroRowsError) Error ¶ added in v0.1.1
func (ze ZeroRowsError) Error() string
func (ZeroRowsError) Is ¶ added in v0.1.1
func (ze ZeroRowsError) Is(target error) bool