core

package
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: 1 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Core

type Core[Entity any] interface {
	Init() error
	Insert(items ...Entity) error
	SelectPage(page dbie.Page, field string, operator dbie.Op, val any, orders ...dbie.Sort) (items dbie.Paginated[Entity], err error)
	Close() error
}

type GenericBackend

type GenericBackend[Entity any] struct {
	Core[Entity]
}

func (GenericBackend[Entity]) Close

func (p GenericBackend[Entity]) Close() error

func (GenericBackend[Entity]) Select

func (p GenericBackend[Entity]) Select(field string, operator dbie.Op, val any, orders ...dbie.Sort) (items []Entity, err error)

func (GenericBackend[Entity]) SelectOne

func (p GenericBackend[Entity]) SelectOne(field string, operator dbie.Op, val any, orders ...dbie.Sort) (item Entity, err error)

Directories

Path Synopsis
bun module
gorm module
mongo module
pg module

Jump to

Keyboard shortcuts

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