Versions in this module Expand all Collapse all v1 v1.1.1 Jul 5, 2025 Changes in this version + var ErrCloseLargeObject = errors.New("failed to close large object") + var ErrCreateLargeObject = errors.New("failed to create large object") + var ErrOpenLargeObject = errors.New("failed to open large object") + var ErrReadLargeObject = errors.New("failed to read from large object") + var ErrRemoveLargeObject = errors.New("failed to remove large object") + var ErrSeekLargeObject = errors.New("failed to seek in large object") + var ErrTellLargeObject = errors.New("failed to get position in large object") + var ErrTruncateLargeObject = errors.New("failed to truncate large object") + var ErrUnknown = errors.New("unknown error") + var ErrWriteLargeObject = errors.New("failed to write to large object") + func CreateLargeObject(ctx context.Context, conn interface{ ... }, oid uint32) (out uint32, err error) + func Error(in error) error + func Parse[T Cond](row interface{ ... }, out T) (err error) + func UnlinkLargeObject(ctx context.Context, conn interface{ ... }, oid uint32) (err error) + func Upsert[T Cond](ctx context.Context, conn interface{ ... }, in T) error + type Code int + const DuplicateKeyValue + const ForeignKey + const NotNull + const NotSet type Cond + Error func(error) error + SetCursor func([]byte) + type ErrViolate struct + func UnwrapErrViolate(in error) (d *ErrViolate, ok bool) + func (d *ErrViolate) Column() string + func (d *ErrViolate) Constraint() string + func (d ErrViolate) Error() string + type JoinRez interface + Add func(JoinRez[T]) + After func() bool + Before func() bool + Get func() []T + Set func([]T) + Start func() []byte + Stop func() []byte + type LargeObject struct + func OpenLargeObject(ctx context.Context, conn interface{ ... }, oid uint32, mode LargeObjectMode) (out *LargeObject, err error) + func (o *LargeObject) Close() (err error) + func (o *LargeObject) Read(p []byte) (n int, err error) + func (o *LargeObject) Seek(offset int64, whence int) (n int64, err error) + func (o *LargeObject) Tell() (n int64, err error) + func (o *LargeObject) Truncate(size int64) (err error) + func (o *LargeObject) Write(p []byte) (n int, err error) + type LargeObjectMode int32 + const LargeObjectModeRead + const LargeObjectModeWrite type ListRez + func NewTypeList[T Cond, E Cond](in []T, oldList ListRez[E]) ListRez[T] + Add func(ListRez[T]) type Request + FQ func() string + Q func() string + SortedFields func() []string v1.0.1 Dec 17, 2022 Changes in this version + const DefaultLimit + const MaxLimit + var ErrDuplicateKeyValueViolates = errors.New("duplicate key value violates") + var ErrNoRowAffected = errors.New("no row affected") + var ErrNoRows = errors.New("not found") + var ErrorUnknown = errors.New("unknown error") + func Copy(ctx context.Context, conn interface{ ... }, arr []T) (err error) + func Delete(ctx context.Context, conn interface{ ... }, in T) (err error) + func Get(ctx context.Context, conn interface{ ... }, out T, list ...any) (err error) + func GetOrder(before bool, order Direction) (isBackSort bool, qOrder Direction, sign Sign) + func Insert(ctx context.Context, conn interface{ ... }, in T) (err error) + func Query(q string, arg ...any) query + func Update(ctx context.Context, conn interface{ ... }, in T) (err error) + func Upset(ctx context.Context, conn interface{ ... }, in T) (err error) + type Cond interface + Cols func(primary bool, queryType QType) []string + Cursor func() []byte + Db func() string + Equal func(any) bool + FieldByName func(string) any + New func() any + Primaries func() []string + ValueByName func(string) any + type Direction int8 + const ASC + const DESC + func (d Direction) String() string + type FieldName string + type FieldNameToText string + type FieldValue any + type FieldValueArray []any + func ToFieldValueArray(in T) FieldValueArray + type ListRez interface + After func() bool + Before func() bool + Get func() []T + Set func([]T) + Start func() []byte + Stop func() []byte + func List(ctx context.Context, conn interface{ ... }, cursor T, req Request, ...) (out ListRez[T], err error) + func NewList(in []T, isCursor bool, lim int, before bool) ListRez[T] + type NullJson struct + Handler func(value []byte, ok bool) + func (ns *NullJson) Scan(value any) error + type Operation int + const AND + const EB + const END + const EQ + const EQA + const G + const GE + const L + const LE + const NOT + const OR + const SB + func (o Operation) String() string + type QType int8 + const QInsert + const QSelect + const QUpdate + type Request interface + Before func() bool + Limit func() int + Order func() Direction + Query func([]FieldName) []any + func DefaultRequest() Request + func NewRequest(limit int, order Direction, before bool, fq, q string) Request + type Sign int8 + func (i Sign) Sign() string