xpq

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 8 Imported by: 3

README

xpq

This is an tiny fork for lib/pq in order to have a StringArray type.

upstream: https://github.com/lib/pq/ license: MIT

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SupportedArrayGoTypes = map[string]bool{
	"string":  true,
	"int8":    true,
	"int16":   true,
	"int32":   true,
	"int64":   true,
	"uint8":   true,
	"uint16":  true,
	"uint32":  true,
	"uint64":  true,
	"float32": true,
	"float64": true,
	"bool":    true,
	"[]byte":  true,
}

jsonb would be the most useful addition.

Functions

func NetworkRange added in v0.4.0

func NetworkRange(p netip.Prefix) (netip.Addr, netip.Addr)

Types

type Array added in v0.1.8

type Array[T sqlable] []T

func (Array[T]) Value added in v0.1.8

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

type StringArray

type StringArray []string

StringArray represents a one-dimensional array of the PostgreSQL character types.

func (*StringArray) Scan

func (a *StringArray) Scan(src interface{}) error

Scan implements the sql.Scanner interface.

func (StringArray) Value

func (a StringArray) Value() (driver.Value, error)

Value implements the driver.Valuer interface.

type VectorValue added in v0.3.9

type VectorValue []float32

func (VectorValue) Value added in v0.3.9

func (v VectorValue) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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