Versions in this module Expand all Collapse all v0 v0.1.0 Sep 20, 2023 Changes in this version + type DB struct + func NewDB() *DB + func (db *DB) Simple() hohin.SimpleDB + func (db *DB) Transaction(ctx context.Context, f func(context.Context, hohin.DB) error) error + func (db *DB) Tx(ctx context.Context, _ hohin.IsolationLevel, ...) error + type Repo struct + func NewRepo(collection string) *Repo[T] + func (r *Repo[T]) Add(ctx context.Context, d hohin.DB, entity T) error + func (r *Repo[T]) AddMany(ctx context.Context, d hohin.DB, entities []T) error + func (r *Repo[T]) Clear(ctx context.Context, d hohin.DB) error + func (r *Repo[T]) CountAll(ctx context.Context, d hohin.DB) (uint64, error) + func (r *Repo[T]) Delete(ctx context.Context, d hohin.DB, f hohin.Filter) error + func (r *Repo[T]) Exists(ctx context.Context, d hohin.DB, f hohin.Filter) (bool, error) + func (r *Repo[T]) Get(ctx context.Context, d hohin.DB, f hohin.Filter) (T, error) + func (r *Repo[T]) GetFirst(ctx context.Context, d hohin.DB, q hohin.Query) (T, error) + func (r *Repo[T]) GetForUpdate(ctx context.Context, d hohin.DB, f hohin.Filter) (T, error) + func (r *Repo[T]) GetMany(ctx context.Context, d hohin.DB, q hohin.Query) ([]T, error) + func (r *Repo[T]) Simple() hohin.SimpleRepo[T] + func (r *Repo[T]) Update(ctx context.Context, d hohin.DB, f hohin.Filter, entity T) error + func (r Repo[T]) Count(ctx context.Context, d hohin.DB, f hohin.Filter) (uint64, error)