pg.v5: gopkg.in/pg.v5/types Index | Files

package types

import "gopkg.in/pg.v5/types"

Index

Package Files

append.go append_array.go append_field.go append_hstore.go append_jsonb.go append_value.go array.go hstore.go in_op.go interface.go result.go scan.go scan_array.go scan_hstore.go scan_value.go time.go

func Append Uses

func Append(b []byte, v interface{}, 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 IsSQLScanner Uses

func IsSQLScanner(typ reflect.Type) bool

func ParseTime Uses

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

func Scan Uses

func Scan(v interface{}, b []byte) error

func ScanValue Uses

func ScanValue(v reflect.Value, b []byte) 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) Scan Uses

func (a *Array) Scan(b interface{}) error

func (*Array) Value Uses

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

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(dst []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) Scan Uses

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

func (*Hstore) Value Uses

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

type InOp Uses

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

func In Uses

func In(slice interface{}) *InOp

func (*InOp) AppendValue Uses

func (in *InOp) AppendValue(b []byte, quote int) ([]byte, error)

type Q Uses

type Q string

Q represents safe SQL query.

func (Q) AppendValue Uses

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

type Result Uses

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

A Result summarizes an executed SQL command.

func NewResult Uses

func NewResult(b []byte, returned int) *Result

func (Result) RowsAffected Uses

func (r Result) RowsAffected() int

RowsAffected returns the number of rows affected by SELECT, INSERT, UPDATE, or DELETE queries. It returns -1 when query can't possibly affect any rows, e.g. in case of CREATE or SHOW queries.

func (Result) RowsReturned Uses

func (r Result) RowsReturned() int

RowsReturned returns the number of rows returned by the query.

type ScannerFunc Uses

type ScannerFunc func(reflect.Value, []byte) 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)
}

Package types imports 11 packages (graph) and is imported by 7 packages. Updated 2018-03-04. Refresh now. Tools for package owners.