bun

package module
v0.0.0-...-1dcaae5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New[Entity any](ctx context.Context, db *bun.DB) dbie.Repo[Entity]

Types

type Bun

type Bun[Entity any] struct {
	context.Context
	*bun.DB
}

func (Bun[Entity]) Close

func (core Bun[Entity]) Close() error

func (Bun[Entity]) Init

func (core Bun[Entity]) Init() error

func (Bun[Entity]) Insert

func (core Bun[Entity]) Insert(items ...Entity) error

func (Bun[Entity]) InsertCtx

func (core Bun[Entity]) InsertCtx(ctx context.Context, items ...Entity) error

func (Bun[Entity]) SelectPage

func (core Bun[Entity]) SelectPage(
	page dbie.Page, field string, operator dbie.Op, val any, orders ...dbie.Sort,
) (dbie.Paginated[Entity], error)

func (Bun[Entity]) SelectPageCtx

func (core Bun[Entity]) SelectPageCtx(
	ctx context.Context, page dbie.Page, field string, operator dbie.Op, val any, orders ...dbie.Sort,
) (items dbie.Paginated[Entity], err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL