Documentation
¶
Index ¶
- Variables
- func InOrEq[I, T any](tx IWhere[I], key string, val []T, format ...func(any) any) I
- func InOrEqSafe[I, T any](tx IWhere[I], key any, val []T, format ...func(any) any) I
- func OrLikeEq[I any](tx IWhereOr[I], key string, val []string, format ...func(any) any) I
- func UsePagination[I any](x *Pagination, tx interface{ ... }) I
- func UseSort[I any](x []*Sort, tx IOrder[I]) I
- func WhereStruct[I any](tx interface{ ... }, qk string, val *structpb.Struct) I
- type IErr
- type ILimit
- type IOffset
- type IOrder
- type IWhere
- type IWhereOr
- type Pagination
- type Sort
- type Sort_Asc
- type Sort_Desc
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrPageTooBig = errors.New("page too big")
View Source
var File_query_v1_pagination_proto protoreflect.FileDescriptor
View Source
var File_query_v1_sort_proto protoreflect.FileDescriptor
Functions ¶
func InOrEq ¶ added in v1.1.2
InOrEq use
InOrEq[uint64](nil, "key", []uint64{1, 2}) InOrEq[uint64](nil, "key", []uint64{1, 2}, func(a any) any { return bun.In(a) })
func InOrEqSafe ¶ added in v1.1.2
InOrEqSafe use
InOrEqSafe[uint64](nil, bun.Ident("key"), []uint64{1, 2}) InOrEqSafe[uint64](nil, bun.Ident("key"), []uint64{1, 2}, func(a any) any { return bun.In(a) })
func UsePagination ¶ added in v1.1.2
func UsePagination[I any](x *Pagination, tx interface { IErr[I] ILimit[I] IOffset[I] }) I
Types ¶
type Pagination ¶
type Pagination struct {
Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// contains filtered or unexported fields
}
func (*Pagination) Descriptor
deprecated
func (*Pagination) Descriptor() ([]byte, []int)
Deprecated: Use Pagination.ProtoReflect.Descriptor instead.
func (*Pagination) GetPage ¶
func (x *Pagination) GetPage() int64
func (*Pagination) GetPageSize ¶
func (x *Pagination) GetPageSize() int64
func (*Pagination) ProtoMessage ¶
func (*Pagination) ProtoMessage()
func (*Pagination) ProtoReflect ¶
func (x *Pagination) ProtoReflect() protoreflect.Message
func (*Pagination) Reset ¶
func (x *Pagination) Reset()
func (*Pagination) String ¶
func (x *Pagination) String() string
type Sort ¶
type Sort struct {
// Types that are assignable to Key:
//
// *Sort_Asc
// *Sort_Desc
Key isSort_Key `protobuf_oneof:"key"`
// contains filtered or unexported fields
}
func (*Sort) Descriptor
deprecated
func (*Sort) ProtoMessage ¶
func (*Sort) ProtoMessage()
func (*Sort) ProtoReflect ¶
func (x *Sort) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.