Documentation ¶
Overview ¶
The API in this package is not stable and may change without any notice.
Index ¶
- func Append(b []byte, v interface{}, flags int) []byte
- func AppendBytes(b []byte, bytes []byte, flags int) []byte
- func AppendError(b []byte, err error) []byte
- func AppendIdent(b []byte, field string, flags int) []byte
- func AppendIdentBytes(b []byte, field []byte, flags int) []byte
- func AppendJSONB(b, jsonb []byte, flags int) []byte
- func AppendNull(b []byte, flags int) []byte
- func AppendString(b []byte, s string, flags int) []byte
- func AppendTime(b []byte, tm time.Time, flags int) []byte
- func NewHexDecoder(rd Reader, n int) (io.Reader, error)
- func ParseTime(b []byte) (time.Time, error)
- func ParseTimeString(s string) (time.Time, error)
- func ReadBytes(rd Reader, b []byte) error
- func ReadColumnValue(col ColumnInfo, rd Reader, n int) (interface{}, error)
- func RegisterAppender(value interface{}, fn AppenderFunc)
- func RegisterScanner(value interface{}, fn ScannerFunc)
- func Scan(v interface{}, rd Reader, n int) error
- func ScanBool(rd Reader, n int) (bool, error)
- func ScanBytes(rd Reader, n int) ([]byte, error)
- func ScanFloat32(rd Reader, n int) (float32, error)
- func ScanFloat64(rd Reader, n int) (float64, error)
- func ScanInt(rd Reader, n int) (int, error)
- func ScanInt64(rd Reader, n int) (int64, error)
- func ScanString(rd Reader, n int) (string, error)
- func ScanTime(rd Reader, n int) (time.Time, error)
- func ScanUint64(rd Reader, n int) (uint64, error)
- func ScanValue(v reflect.Value, rd Reader, n int) error
- type AppenderFunc
- type Array
- type ArrayValueScanner
- type ColumnInfo
- type HexEncoder
- type Hstore
- type Ident
- type NullTime
- type RawValue
- type Reader
- type Safe
- type ScannerFunc
- type ValueAppender
- type ValueScanner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendError ¶
func AppendJSONB ¶
func AppendNull ¶
func ReadColumnValue ¶
func ReadColumnValue(col ColumnInfo, rd Reader, n int) (interface{}, error)
func RegisterAppender ¶
func RegisterAppender(value interface{}, fn AppenderFunc)
RegisterAppender registers an appender func for the value type. Expecting to be used only during initialization, it panics if there is already a registered appender for the given type.
func RegisterScanner ¶
func RegisterScanner(value interface{}, fn ScannerFunc)
RegisterScanner registers an scanner func for the type. Expecting to be used only during initialization, it panics if there is already a registered scanner for the given type.
Types ¶
type AppenderFunc ¶
func Appender ¶
func Appender(typ reflect.Type) AppenderFunc
func ArrayAppender ¶
func ArrayAppender(typ reflect.Type) AppenderFunc
func HstoreAppender ¶
func HstoreAppender(typ reflect.Type) AppenderFunc
type ArrayValueScanner ¶
type ColumnInfo ¶
type ColumnInfo = pool.ColumnInfo
type HexEncoder ¶ added in v10.2.0
type HexEncoder struct {
// contains filtered or unexported fields
}
func NewHexEncoder ¶ added in v10.2.0
func NewHexEncoder(b []byte, flags int) *HexEncoder
func (*HexEncoder) Bytes ¶ added in v10.2.0
func (enc *HexEncoder) Bytes() []byte
func (*HexEncoder) Close ¶ added in v10.2.0
func (enc *HexEncoder) Close() error
type NullTime ¶
NullTime is a time.Time wrapper that marshals zero time as JSON null and PostgreSQL NULL.
func (NullTime) MarshalJSON ¶
func (*NullTime) UnmarshalJSON ¶
type RawValue ¶ added in v10.1.0
func (RawValue) AppendValue ¶ added in v10.1.0
func (RawValue) MarshalJSON ¶ added in v10.1.0
type ScannerFunc ¶
func ArrayScanner ¶
func ArrayScanner(typ reflect.Type) ScannerFunc
func HstoreScanner ¶
func HstoreScanner(typ reflect.Type) ScannerFunc
func Scanner ¶
func Scanner(typ reflect.Type) ScannerFunc
type ValueAppender ¶
func In ¶
func In(slice interface{}) ValueAppender
func InMulti ¶
func InMulti(values ...interface{}) ValueAppender
type ValueScanner ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.