Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseOption ¶
type BaseOption struct { Ignore bool // ignore if exist Lock bool // lock row ReadOnly bool // read only Selects []string // select fields Omits []string // omit fields select omit Conds []any // conds where Page IPage // page BatchSize int64 // exec by batch }
BaseOption base repo exec
type IPage ¶
type IPage interface { GetPageIndex() int64 GetPageSize() int64 GetBegin() int64 GetSize() int64 GetSorts() []ISortField }
IPage page request
type IPaginator ¶
type IRepository ¶
type IRepository[T IEntity] interface { BaseCreate(ctx context.Context, opt BaseOption, p ...T) (int64, error) BaseSave(ctx context.Context, opt BaseOption, p ...T) (int64, error) BaseUpdate(ctx context.Context, opt BaseOption, p T) (int64, error) BaseGet(ctx context.Context, opt BaseOption, p T) (int64, error) BaseDelete(ctx context.Context, opt BaseOption, p T) (int64, error) BaseCount(ctx context.Context, opt BaseOption, p T) (int64, error) BaseQuery(ctx context.Context, opt BaseOption, p T) ([]T, error) }
IRepository repo
type ISortField ¶
ISortField sort field
Click to show internal directories.
Click to hide internal directories.