pgtypes

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Array

type Array[T any] []T

func (*Array[T]) Scan

func (e *Array[T]) Scan(src any) error

Scan implements the sql.Scanner interface.

func (Array[T]) Value

func (e Array[T]) Value() (driver.Value, error)

Value implements the driver.Valuer interface.

type EnumArray

type EnumArray[T ~string] []T

func (*EnumArray[T]) Scan

func (e *EnumArray[T]) Scan(src any) error

Scan implements the sql.Scanner interface.

func (EnumArray[T]) Value

func (e EnumArray[T]) Value() (driver.Value, error)

Value implements the driver.Valuer interface.

type HStore

type HStore map[string]null.Val[string]

HStore is a wrapper for transferring HStore values back and forth easily.

func (*HStore) Scan

func (h *HStore) Scan(value any) error

Scan implements the Scanner interface.

Note h is reallocated before the scan to clear existing values. If the hstore column's database value is NULL, then h is set to nil instead.

func (HStore) Value

func (h HStore) Value() (driver.Value, error)

Value implements the driver Valuer interface. Note if h is nil, the database column value will be set to NULL.

type Inet

type Inet struct {
	netip.Prefix
}

func (*Inet) Scan

func (i *Inet) Scan(src any) error

Scan implements the sql.Scanner interface.

func (Inet) Value

func (i Inet) Value() (driver.Value, error)

Value implements the driver.Valuer interface.

type LSN

type LSN uint64

func (*LSN) Scan

func (lsn *LSN) Scan(src interface{}) error

Scan implements the sql.Scanner interface.

func (LSN) Value

func (lsn LSN) Value() (driver.Value, error)

Value implements the driver.Valuer interface.

type Macaddr

type Macaddr struct {
	Addr net.HardwareAddr
}

func (*Macaddr) Scan

func (dst *Macaddr) Scan(src interface{}) error

Scan implements the database/sql Scanner interface.

func (Macaddr) Value

func (src Macaddr) Value() (driver.Value, error)

Value implements the database/sql/driver Valuer interface.

type TSVector

type TSVector struct {
	// contains filtered or unexported fields
}

func (*TSVector) Scan

func (t *TSVector) Scan(src any) error

Scan implements the sql.Scanner interface.

func (TSVector) String

func (t TSVector) String() string

String returns the string representation of the TSVector.

func (TSVector) Value

func (t TSVector) Value() (driver.Value, error)

Value implements the driver.Valuer interface.

type TxIDSnapshot

type TxIDSnapshot struct {
	Min    string
	Max    string
	Active []string
}

func (*TxIDSnapshot) Scan

func (s *TxIDSnapshot) Scan(src any) error

Scan implements the sql.Scanner interface.

func (TxIDSnapshot) String

func (s TxIDSnapshot) String() string

String returns the string representation of the TxIDSnapshot.

func (TxIDSnapshot) Value

func (s TxIDSnapshot) Value() (driver.Value, error)

Value implements the driver.Valuer interface.

Jump to

Keyboard shortcuts

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