Documentation ¶
Index ¶
- Constants
- func DatabaseSQLValue(ci *pgtype.ConnInfo, src pgtype.Value) (interface{}, error)
- func EncodeValueText(src pgtype.TextEncoder) (interface{}, error)
- func GetAssignToDstType(dst interface{}) (interface{}, bool)
- func NullAssignTo(dst interface{}) error
- type Bool
- func (src *Bool) AssignTo(dst interface{}) error
- func (dst *Bool) DecodeBinary(_ *pgtype.ConnInfo, src []byte) error
- func (dst *Bool) DecodeText(_ *pgtype.ConnInfo, src []byte) error
- func (src Bool) EncodeBinary(_ *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (src Bool) EncodeText(_ *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (dst Bool) Get() interface{}
- func (src Bool) MarshalJSON() ([]byte, error)
- func (dst *Bool) Scan(src interface{}) error
- func (dst *Bool) Set(src interface{}) error
- func (dst *Bool) UnmarshalJSON(b []byte) error
- func (src Bool) Value() (driver.Value, error)
- func (dst Bool) ValueOrZero() bool
- type BoundType
- type Hstore
- func (src *Hstore) AssignTo(dst interface{}) error
- func (dst *Hstore) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error
- func (dst *Hstore) DecodeText(ci *pgtype.ConnInfo, src []byte) error
- func (src Hstore) EncodeBinary(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (src Hstore) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (dst Hstore) Get() interface{}
- func (dst Hstore) Len() int
- func (src Hstore) MarshalJSON() (b []byte, err error)
- func (dst *Hstore) Scan(src interface{}) error
- func (dst *Hstore) Set(src interface{}) error
- func (dst *Hstore) UnmarshalJSON(b []byte) (err error)
- func (src Hstore) Value() (driver.Value, error)
- type Inet
- func (src *Inet) AssignTo(dst interface{}) error
- func (dst *Inet) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error
- func (dst *Inet) DecodeText(ci *pgtype.ConnInfo, src []byte) error
- func (src Inet) EncodeBinary(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (src Inet) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (dst Inet) Get() interface{}
- func (src Inet) MarshalJSON() ([]byte, error)
- func (dst *Inet) Scan(src interface{}) error
- func (dst *Inet) Set(src interface{}) error
- func (dst *Inet) UnmarshalJSON(b []byte) error
- func (src Inet) Value() (driver.Value, error)
- type InetArray
- func (src *InetArray) AssignTo(dst interface{}) error
- func (dst *InetArray) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error
- func (dst *InetArray) DecodeText(ci *pgtype.ConnInfo, src []byte) error
- func (src InetArray) EncodeBinary(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (src InetArray) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (dst InetArray) Get() interface{}
- func (dst InetArray) Len() int
- func (src InetArray) MarshalJSON() ([]byte, error)
- func (dst *InetArray) Scan(src interface{}) error
- func (dst *InetArray) Set(src interface{}) error
- func (dst *InetArray) UnmarshalJSON(b []byte) error
- func (src InetArray) Value() (driver.Value, error)
- type JSON
- func (src *JSON) AssignTo(dst interface{}) error
- func (dst *JSON) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error
- func (dst *JSON) DecodeText(ci *pgtype.ConnInfo, src []byte) error
- func (src JSON) EncodeBinary(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (src JSON) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (dst JSON) Get() interface{}
- func (src JSON) MarshalJSON() ([]byte, error)
- func (JSON) PreferredParamFormat() int16
- func (JSON) PreferredResultFormat() int16
- func (dst *JSON) Scan(src interface{}) error
- func (dst *JSON) Set(src interface{}) error
- func (dst *JSON) UnmarshalJSON(b []byte) error
- func (src JSON) Value() (driver.Value, error)
- type JSONB
- func (src *JSONB) AssignTo(dst interface{}) error
- func (dst *JSONB) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error
- func (dst *JSONB) DecodeText(ci *pgtype.ConnInfo, src []byte) error
- func (src JSONB) EncodeBinary(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (src JSONB) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (dst JSONB) Get() interface{}
- func (src JSONB) MarshalJSON() ([]byte, error)
- func (JSONB) PreferredParamFormat() int16
- func (JSONB) PreferredResultFormat() int16
- func (dst *JSONB) Scan(src interface{}) error
- func (dst *JSONB) Set(src interface{}) error
- func (dst *JSONB) UnmarshalJSON(b []byte) error
- func (src JSONB) Value() (driver.Value, error)
- type Numeric
- func (src *Numeric) AssignTo(dst interface{}) error
- func (dst *Numeric) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error
- func (dst *Numeric) DecodeText(ci *pgtype.ConnInfo, src []byte) error
- func (src Numeric) EncodeBinary(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (src Numeric) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (dst Numeric) Get() interface{}
- func (src Numeric) MarshalJSON() ([]byte, error)
- func (dst *Numeric) Scan(src interface{}) error
- func (dst *Numeric) Set(src interface{}) error
- func (dst *Numeric) UnmarshalJSON(b []byte) error
- func (src Numeric) Value() (driver.Value, error)
- type Status
- type Text
- func (src *Text) AssignTo(dst interface{}) error
- func (dst *Text) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error
- func (dst *Text) DecodeText(ci *pgtype.ConnInfo, src []byte) error
- func (src Text) EncodeBinary(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (src Text) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (dst Text) Get() interface{}
- func (dst Text) IsZero() bool
- func (src Text) MarshalJSON() ([]byte, error)
- func (Text) PreferredParamFormat() int16
- func (Text) PreferredResultFormat() int16
- func (dst *Text) Scan(src interface{}) error
- func (dst *Text) Set(src interface{}) error
- func (dst *Text) UnmarshalJSON(b []byte) error
- func (src Text) Value() (driver.Value, error)
- func (dst Text) ValueOrZero() string
- type Timestamptz
- func (src *Timestamptz) AssignTo(dst interface{}) error
- func (dst *Timestamptz) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error
- func (dst *Timestamptz) DecodeText(ci *pgtype.ConnInfo, src []byte) error
- func (src Timestamptz) EncodeBinary(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (src Timestamptz) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (dst Timestamptz) Get() interface{}
- func (dst Timestamptz) IsZero() bool
- func (src Timestamptz) MarshalJSON() ([]byte, error)
- func (dst *Timestamptz) Scan(src interface{}) error
- func (dst *Timestamptz) Set(src interface{}) error
- func (dst *Timestamptz) UnmarshalJSON(b []byte) error
- func (src Timestamptz) Value() (driver.Value, error)
- func (dst Timestamptz) ValueOrZero() time.Time
- type Tstzrange
- func (src *Tstzrange) AssignTo(dst interface{}) error
- func (dst *Tstzrange) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error
- func (dst *Tstzrange) DecodeText(ci *pgtype.ConnInfo, src []byte) error
- func (src Tstzrange) EncodeBinary(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (src Tstzrange) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (dst Tstzrange) Get() interface{}
- func (dst *Tstzrange) Scan(src interface{}) error
- func (dst *Tstzrange) Set(src interface{}) error
- func (src Tstzrange) Value() (driver.Value, error)
- type UUID
- func (src *UUID) AssignTo(dst interface{}) error
- func (dst *UUID) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error
- func (dst *UUID) DecodeText(ci *pgtype.ConnInfo, src []byte) error
- func (src UUID) EncodeBinary(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (src UUID) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (dst UUID) Get() interface{}
- func (dst UUID) IsZero() bool
- func (src UUID) MarshalJSON() ([]byte, error)
- func (dst *UUID) Scan(src interface{}) error
- func (dst *UUID) Set(src interface{}) error
- func (dst UUID) String() string
- func (dst *UUID) UnmarshalJSON(b []byte) (err error)
- func (src UUID) Value() (driver.Value, error)
- func (dst UUID) ValueOrZero() uuid.UUID
- type UUIDArray
- func (src *UUIDArray) AssignTo(dst interface{}) error
- func (dst *UUIDArray) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error
- func (dst *UUIDArray) DecodeText(ci *pgtype.ConnInfo, src []byte) error
- func (src UUIDArray) EncodeBinary(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (src UUIDArray) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (dst UUIDArray) Get() interface{}
- func (dst UUIDArray) Len() int
- func (src UUIDArray) MarshalJSON() ([]byte, error)
- func (dst *UUIDArray) Scan(src interface{}) error
- func (dst *UUIDArray) Set(src interface{}) error
- func (dst *UUIDArray) UnmarshalJSON(b []byte) (err error)
- func (src UUIDArray) Value() (driver.Value, error)
- type UntypedBinaryRange
- type UntypedTextRange
- type Varchar
- func (src *Varchar) AssignTo(dst interface{}) error
- func (dst *Varchar) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error
- func (dst *Varchar) DecodeText(ci *pgtype.ConnInfo, src []byte) error
- func (src Varchar) EncodeBinary(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (src Varchar) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (dst Varchar) Get() interface{}
- func (dst Varchar) IsZero() bool
- func (src Varchar) MarshalJSON() ([]byte, error)
- func (Varchar) PreferredParamFormat() int16
- func (Varchar) PreferredResultFormat() int16
- func (dst *Varchar) Scan(src interface{}) error
- func (dst *Varchar) Set(src interface{}) error
- func (dst *Varchar) UnmarshalJSON(b []byte) error
- func (src Varchar) Value() (driver.Value, error)
- func (dst Varchar) ValueOrZero() string
- type VarcharArray
- func (src *VarcharArray) AssignTo(dst interface{}) error
- func (dst *VarcharArray) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error
- func (dst *VarcharArray) DecodeText(ci *pgtype.ConnInfo, src []byte) error
- func (src VarcharArray) EncodeBinary(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (src VarcharArray) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (dst VarcharArray) Get() interface{}
- func (src VarcharArray) MarshalJSON() ([]byte, error)
- func (dst *VarcharArray) Scan(src interface{}) error
- func (dst *VarcharArray) Set(src interface{}) error
- func (dst *VarcharArray) UnmarshalJSON(b []byte) (err error)
- func (src VarcharArray) Value() (driver.Value, error)
Constants ¶
const ( Inclusive = BoundType('i') Exclusive = BoundType('e') Unbounded = BoundType('U') Empty = BoundType('E') )
Variables ¶
This section is empty.
Functions ¶
func DatabaseSQLValue ¶
func EncodeValueText ¶
func EncodeValueText(src pgtype.TextEncoder) (interface{}, error)
func GetAssignToDstType ¶
func GetAssignToDstType(dst interface{}) (interface{}, bool)
GetAssignToDstType attempts to convert dst to something AssignTo can assign to. If dst is a pointer to pointer it allocates a value and returns the dereferences pointer. If dst is a named type such as *Foo where Foo is type Foo int16, it converts dst to *int16.
GetAssignToDstType returns the converted dst and a bool representing if any change was made.
func NullAssignTo ¶
func NullAssignTo(dst interface{}) error
Types ¶
type Bool ¶
func (Bool) EncodeBinary ¶
func (Bool) MarshalJSON ¶
func (*Bool) UnmarshalJSON ¶
func (Bool) ValueOrZero ¶
type Hstore ¶
Hstore represents an hstore column that can be null or have null values associated with its keys.
func (*Hstore) DecodeBinary ¶
func (Hstore) EncodeBinary ¶
func (Hstore) EncodeText ¶
func (Hstore) MarshalJSON ¶
func (*Hstore) UnmarshalJSON ¶
type Inet ¶
Inet represents both inet and cidr PostgreSQL types.
func (Inet) EncodeBinary ¶
EncodeBinary encodes src into w.
func (Inet) EncodeText ¶
func (Inet) MarshalJSON ¶
func (*Inet) UnmarshalJSON ¶
type InetArray ¶
type InetArray struct { Elements []Inet Dimensions []pgtype.ArrayDimension Status Status }
func (*InetArray) DecodeBinary ¶
func (*InetArray) DecodeText ¶
func (InetArray) EncodeBinary ¶
func (InetArray) EncodeText ¶
func (InetArray) MarshalJSON ¶
func (*InetArray) UnmarshalJSON ¶
type JSON ¶
func (JSON) EncodeBinary ¶
func (JSON) EncodeText ¶
func (JSON) MarshalJSON ¶
func (JSON) PreferredParamFormat ¶
func (JSON) PreferredResultFormat ¶
func (*JSON) UnmarshalJSON ¶
type JSONB ¶
type JSONB JSON
func (JSONB) EncodeBinary ¶
func (JSONB) EncodeText ¶
func (JSONB) MarshalJSON ¶
func (JSONB) PreferredParamFormat ¶
func (JSONB) PreferredResultFormat ¶
func (*JSONB) UnmarshalJSON ¶
type Numeric ¶
func (*Numeric) DecodeBinary ¶
func (Numeric) EncodeBinary ¶
func (Numeric) EncodeText ¶
func (Numeric) MarshalJSON ¶
func (*Numeric) UnmarshalJSON ¶
type Text ¶
func (Text) EncodeBinary ¶
func (Text) EncodeText ¶
func (Text) MarshalJSON ¶
func (Text) PreferredParamFormat ¶
func (Text) PreferredResultFormat ¶
func (*Text) UnmarshalJSON ¶
func (Text) ValueOrZero ¶
type Timestamptz ¶
type Timestamptz struct { Time time.Time Status Status InfinityModifier pgtype.InfinityModifier }
func (*Timestamptz) AssignTo ¶
func (src *Timestamptz) AssignTo(dst interface{}) error
func (*Timestamptz) DecodeBinary ¶
func (dst *Timestamptz) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error
func (*Timestamptz) DecodeText ¶
func (dst *Timestamptz) DecodeText(ci *pgtype.ConnInfo, src []byte) error
func (Timestamptz) EncodeBinary ¶
func (Timestamptz) EncodeText ¶
func (Timestamptz) Get ¶
func (dst Timestamptz) Get() interface{}
func (Timestamptz) IsZero ¶
func (dst Timestamptz) IsZero() bool
func (Timestamptz) MarshalJSON ¶
func (src Timestamptz) MarshalJSON() ([]byte, error)
func (*Timestamptz) Scan ¶
func (dst *Timestamptz) Scan(src interface{}) error
Scan implements the database/sql Scanner interface.
func (*Timestamptz) Set ¶
func (dst *Timestamptz) Set(src interface{}) error
func (*Timestamptz) UnmarshalJSON ¶
func (dst *Timestamptz) UnmarshalJSON(b []byte) error
func (Timestamptz) Value ¶
func (src Timestamptz) Value() (driver.Value, error)
Value implements the database/sql/driver Valuer interface.
func (Timestamptz) ValueOrZero ¶
func (dst Timestamptz) ValueOrZero() time.Time
type Tstzrange ¶
type Tstzrange struct { Lower Timestamptz Upper Timestamptz LowerType pgtype.BoundType UpperType pgtype.BoundType Status Status }
func (*Tstzrange) DecodeBinary ¶
func (*Tstzrange) DecodeText ¶
func (Tstzrange) EncodeBinary ¶
func (Tstzrange) EncodeText ¶
type UUID ¶
func (UUID) EncodeBinary ¶
func (UUID) EncodeText ¶
func (UUID) MarshalJSON ¶
func (*UUID) UnmarshalJSON ¶
func (UUID) ValueOrZero ¶
type UUIDArray ¶
type UUIDArray struct { Elements []UUID Dimensions []pgtype.ArrayDimension Status Status }
func (*UUIDArray) DecodeBinary ¶
func (*UUIDArray) DecodeText ¶
func (UUIDArray) EncodeBinary ¶
func (UUIDArray) EncodeText ¶
func (UUIDArray) MarshalJSON ¶
func (*UUIDArray) UnmarshalJSON ¶
type UntypedBinaryRange ¶
type UntypedBinaryRange struct { Lower []byte Upper []byte LowerType BoundType UpperType BoundType }
func ParseUntypedBinaryRange ¶
func ParseUntypedBinaryRange(src []byte) (*UntypedBinaryRange, error)
type UntypedTextRange ¶
func ParseUntypedTextRange ¶
func ParseUntypedTextRange(src string) (*UntypedTextRange, error)
type Varchar ¶
type Varchar Text
func (*Varchar) AssignTo ¶
AssignTo assigns from src to dst. Note that as Varchar is not a general number type AssignTo does not do automatic type conversion as other number types do.
func (*Varchar) DecodeBinary ¶
func (Varchar) EncodeBinary ¶
func (Varchar) EncodeText ¶
func (Varchar) MarshalJSON ¶
func (Varchar) PreferredParamFormat ¶
func (Varchar) PreferredResultFormat ¶
func (*Varchar) Set ¶
Set converts from src to dst. Note that as Varchar is not a general number type Set does not do automatic type conversion as other number types do.
func (*Varchar) UnmarshalJSON ¶
func (Varchar) ValueOrZero ¶
type VarcharArray ¶
type VarcharArray struct { Elements []Varchar Dimensions []pgtype.ArrayDimension Status Status }
func (*VarcharArray) AssignTo ¶
func (src *VarcharArray) AssignTo(dst interface{}) error
func (*VarcharArray) DecodeBinary ¶
func (dst *VarcharArray) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error
func (*VarcharArray) DecodeText ¶
func (dst *VarcharArray) DecodeText(ci *pgtype.ConnInfo, src []byte) error
func (VarcharArray) EncodeBinary ¶
func (VarcharArray) EncodeText ¶
func (VarcharArray) Get ¶
func (dst VarcharArray) Get() interface{}
func (VarcharArray) MarshalJSON ¶
func (src VarcharArray) MarshalJSON() ([]byte, error)
func (*VarcharArray) Scan ¶
func (dst *VarcharArray) Scan(src interface{}) error
Scan implements the database/sql Scanner interface.
func (*VarcharArray) Set ¶
func (dst *VarcharArray) Set(src interface{}) error
func (*VarcharArray) UnmarshalJSON ¶
func (dst *VarcharArray) UnmarshalJSON(b []byte) (err error)