Documentation ¶
Index ¶
- type Repo
- func (d *Repo[T]) Count(ctx context.Context, count *int64, conds ...any) error
- func (d *Repo[T]) Create(ctx context.Context, input *T) error
- func (d *Repo[T]) CreateInBatches(ctx context.Context, input []T, batchSize int) error
- func (d *Repo[T]) Delete(ctx context.Context, conds ...any) error
- func (d *Repo[T]) Existed(ctx context.Context, conds ...any) (bool, error)
- func (d *Repo[T]) List(ctx context.Context, output interface{}, conds ...any) error
- func (d *Repo[T]) Read(ctx context.Context, output *T, conds ...any) error
- func (d *Repo[T]) ReadAllByCondition(ctx context.Context, output interface{}, count *int64, ...) error
- func (d *Repo[T]) ReadByID(ctx context.Context, output *T, id string) error
- func (d *Repo[T]) ReadByUpdate(ctx context.Context, options string, output *T, conds ...any) error
- func (d *Repo[T]) Update(ctx context.Context, updates any, conds ...any) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repo ¶
Repo represents the client for common usages
func (*Repo[T]) CreateInBatches ¶
CreateInBatches creates multiple records in batches
func (*Repo[T]) ReadAllByCondition ¶
func (d *Repo[T]) ReadAllByCondition(ctx context.Context, output interface{}, count *int64, lqc *requestutil.ListQueryCondition) error
ReadAllByCondition retrieves a list of entities based on the provided query conditions.
func (*Repo[T]) ReadByUpdate ¶
ReadByUpdate gets a record and lock it for update
Click to show internal directories.
Click to hide internal directories.