pg: github.com/go-pg/pg/types Index | Files

package types

import "github.com/go-pg/pg/types"

Index

Package Files

append.go append_field.go append_jsonb.go append_value.go array.go array_append.go array_parser.go array_scan.go hstore.go hstore_append.go hstore_parser.go hstore_scan.go in_op.go interface.go null_time.go scan.go scan_value.go time.go

func Append Uses

func Append(b []byte, v interface{}, quote int) []byte

func AppendBytes Uses

func AppendBytes(b []byte, bytes []byte, quote int) []byte

func AppendError Uses

func AppendError(b []byte, err error) []byte

func AppendField Uses

func AppendField(b []byte, field string, quote int) []byte

func AppendFieldBytes Uses

func AppendFieldBytes(b []byte, field []byte, quote int) []byte

func AppendJSONB Uses

func AppendJSONB(b, jsonb []byte, quote int) []byte

func AppendNull Uses

func AppendNull(b []byte, quote int) []byte

func AppendString Uses

func AppendString(b []byte, s string, quote int) []byte

func AppendStringStringMap Uses

func AppendStringStringMap(b []byte, m map[string]string, quote int) []byte

func AppendTime Uses

func AppendTime(b []byte, tm time.Time, quote int) []byte

func ParseTime Uses

func ParseTime(b []byte) (time.Time, error)

func ParseTimeString Uses

func ParseTimeString(s string) (time.Time, error)

func Scan Uses

func Scan(v interface{}, rd Reader, n int) error

func ScanBytes Uses

func ScanBytes(rd Reader, n int) ([]byte, error)

func ScanFloat64 Uses

func ScanFloat64(rd Reader, n int) (float64, error)

func ScanInt Uses

func ScanInt(rd Reader, n int) (int, error)

func ScanInt64 Uses

func ScanInt64(rd Reader, n int) (int64, error)

func ScanString Uses

func ScanString(rd Reader, n int) (string, error)

func ScanTime Uses

func ScanTime(rd Reader, n int) (time.Time, error)

func ScanUint64 Uses

func ScanUint64(rd Reader, n int) (uint64, error)

func ScanValue Uses

func ScanValue(v reflect.Value, rd Reader, n int) error

type AppenderFunc Uses

type AppenderFunc func([]byte, reflect.Value, int) []byte

func Appender Uses

func Appender(typ reflect.Type) AppenderFunc

func ArrayAppender Uses

func ArrayAppender(typ reflect.Type) AppenderFunc

func HstoreAppender Uses

func HstoreAppender(typ reflect.Type) AppenderFunc

type Array Uses

type Array struct {
    // contains filtered or unexported fields
}

func NewArray Uses

func NewArray(vi interface{}) *Array

func (*Array) AppendValue Uses

func (a *Array) AppendValue(b []byte, quote int) ([]byte, error)

func (*Array) ScanValue Uses

func (a *Array) ScanValue(rd Reader, n int) error

func (*Array) Value Uses

func (a *Array) Value() interface{}

type ArrayValueScanner Uses

type ArrayValueScanner interface {
    BeforeScanArrayValue(rd Reader, n int) error
    ScanArrayValue(rd Reader, n int) error
    AfterScanArrayValue() error
}

type BytesReader Uses

type BytesReader = internal.BytesReader

func NewBytesReader Uses

func NewBytesReader(buf []byte) *BytesReader

type F Uses

type F string

F represents a SQL field, e.g. table or column name.

func (F) AppendValue Uses

func (f F) AppendValue(b []byte, quote int) ([]byte, error)

type Hstore Uses

type Hstore struct {
    // contains filtered or unexported fields
}

func NewHstore Uses

func NewHstore(vi interface{}) *Hstore

func (*Hstore) AppendValue Uses

func (h *Hstore) AppendValue(b []byte, quote int) ([]byte, error)

func (*Hstore) ScanValue Uses

func (h *Hstore) ScanValue(rd Reader, n int) error

func (*Hstore) Value Uses

func (h *Hstore) Value() interface{}

type NullTime Uses

type NullTime struct {
    time.Time
}

NullTime is a time.Time wrapper that marshals zero time as JSON null and PostgreSQL NULL.

func (NullTime) AppendValue Uses

func (tm NullTime) AppendValue(b []byte, quote int) ([]byte, error)

func (NullTime) MarshalJSON Uses

func (tm NullTime) MarshalJSON() ([]byte, error)

func (*NullTime) Scan Uses

func (tm *NullTime) Scan(b interface{}) error

func (*NullTime) UnmarshalJSON Uses

func (tm *NullTime) UnmarshalJSON(b []byte) error

type Q Uses

type Q string

Q represents safe SQL query.

func (Q) AppendValue Uses

func (q Q) AppendValue(b []byte, quote int) ([]byte, error)

type Reader Uses

type Reader = internal.Reader

type ScannerFunc Uses

type ScannerFunc func(reflect.Value, Reader, int) error

func ArrayScanner Uses

func ArrayScanner(typ reflect.Type) ScannerFunc

func HstoreScanner Uses

func HstoreScanner(typ reflect.Type) ScannerFunc

func Scanner Uses

func Scanner(typ reflect.Type) ScannerFunc

type ValueAppender Uses

type ValueAppender interface {
    AppendValue(b []byte, quote int) ([]byte, error)
}

func InMulti Uses

func InMulti(values ...interface{}) ValueAppender

func InSlice Uses

func InSlice(slice interface{}) ValueAppender

type ValueScanner Uses

type ValueScanner interface {
    ScanValue(rd Reader, n int) error
}

Package types imports 16 packages (graph) and is imported by 46 packages. Updated 2019-05-21. Refresh now. Tools for package owners.