pgtype

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hstore

type Hstore hstore.Hstore

Hstore implementation

func (Hstore) Data

func (h Hstore) Data() map[string]sql.NullString

Data values for hstore

func (Hstore) Get

func (h Hstore) Get(key string) (string, bool)

Get value by key

func (Hstore) GetBool

func (h Hstore) GetBool(key string) bool

GetBool value from store

func (Hstore) MarshalJSON

func (h Hstore) MarshalJSON() ([]byte, error)

MarshalJSON method

func (*Hstore) Scan

func (h *Hstore) Scan(value interface{}) error

Scan implements the Scanner interface.

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

func (*Hstore) Set

func (h *Hstore) Set(key, value string)

Set value for key

func (Hstore) String

func (h Hstore) String() string

String method implementation of Stringer

func (*Hstore) UnmarshalJSON added in v0.1.1

func (h *Hstore) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the json.Unmarshaller

func (*Hstore) Unset

func (h *Hstore) Unset(key string)

Unset value by key

func (Hstore) Value

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

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

Jump to

Keyboard shortcuts

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