Movatterモバイル変換


[0]ホーム

URL:


pqtype

packagemodule
v0.3.0Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2023 License:MITImports:4Imported by:77

Details

Repository

github.com/sqlc-dev/pqtype

Links

README

Go Referencego

pqtype

pqtype implements Go types for PostgreSQL types when using thelib/pq driver.

Compatibility

pqtype is tested against PostgreSQL 9.6 through 13 and Go 1.13 through 1.17.While these types may work with other drivers, they areonly tested againstthe lib/pq driver.

History

pqtype is a fork ofjackc/pgtype with allthe pgx-specific code removed. TheStatus field on types has been replacedwith aValid boolean to mirror the standard librarysql.Null* types.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

typeCIDR

type CIDRInet

func (*CIDR)Scan

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

func (CIDR)Valueadded inv0.3.0

func (srcCIDR) Value() (driver.Value,error)

typeInet

type Inet struct {IPNetnet.IPNetValidbool}

Inet represents both inet and cidr PostgreSQL types.

func (*Inet)Scan

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

func (Inet)Value

func (srcInet) Value() (driver.Value,error)

Value implements the database/sql/driver Valuer interface.

typeMacaddr

type Macaddr struct {Addrnet.HardwareAddrValidbool}

func (*Macaddr)Scan

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

Scan implements the database/sql Scanner interface.

func (Macaddr)Value

func (srcMacaddr) Value() (driver.Value,error)

Value implements the database/sql/driver Valuer interface.

typeNullRawMessage

type NullRawMessage struct {RawMessagejson.RawMessageValidbool// Valid is true if RawMessage is not NULL}

NullRawMessage represents a json.RawMessage that may be null.NullRawMessage implements the Scanner interface soit can be used as a scan destination, similar to NullString.

func (*NullRawMessage)Scan

func (n *NullRawMessage) Scan(src interface{})error

Scan implements the Scanner interface.

func (NullRawMessage)Value

func (nNullRawMessage) Value() (driver.Value,error)

Value implements the driver Valuer interface.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp