Documentation
¶
Index ¶
- type Array
- func (a Array[T]) Dimensions() []pgtype.ArrayDimension
- func (a Array[T]) Index(i int) any
- func (a Array[T]) IndexType() any
- func (a *Array[T]) Scan(src any) error
- func (a Array[T]) ScanIndex(i int) any
- func (a Array[T]) ScanIndexType() any
- func (a *Array[T]) SetDimensions(dimensions []pgtype.ArrayDimension) error
- func (a Array[T]) Value() (driver.Value, error)
- type EnumArray
- type HStore
- type Inet
- type LSN
- type Macaddr
- type Snapshot
- type TSVector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Array ¶
type Array[T any] []T
Array is a one-dimensional Postgres array. A nil Array is a SQL NULL, an empty non-nil Array is an empty array.
It implements sql.Scanner and driver.Valuer for use with database/sql drivers such as lib/pq and pgx/stdlib, and pgtype.ArraySetter and pgtype.ArrayGetter so that it is natively scanned and encoded by pgx. Scan accepts both the text array literal and the pgx binary wire format, so it also works when wrapped by another sql.Scanner (e.g. null.Val or sql.Null).
func (Array[T]) Dimensions ¶ added in v0.51.0
func (a Array[T]) Dimensions() []pgtype.ArrayDimension
Dimensions implements the pgtype.ArrayGetter interface.
func (Array[T]) ScanIndexType ¶ added in v0.51.0
ScanIndexType implements the pgtype.ArraySetter interface.
func (*Array[T]) SetDimensions ¶ added in v0.51.0
func (a *Array[T]) SetDimensions(dimensions []pgtype.ArrayDimension) error
SetDimensions implements the pgtype.ArraySetter interface. Multi-dimensional arrays are flattened.
type HStore ¶
HStore is a wrapper for transferring HStore values back and forth easily.
type Macaddr ¶
type Macaddr struct {
Addr net.HardwareAddr
}