dba

package module
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: MIT Imports: 1 Imported by: 1

README

go_dba_core

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRepositoryClientNotAbleToConnect = errors.New("dba: unable to connect to client")
	ErrRepositoryEntityNotFound         = errors.New("dba: no entity found")
	ErrRepositoryInternalError          = errors.New("dba: internal error")
)

Functions

This section is empty.

Types

type BaseEntity added in v1.1.0

type BaseEntity[ID string | uint64] struct {
	Id        ID
	CreatedAt int64
	UpdatedAt int64
}

type Repository

type Repository[Entity any, Id string | uint64] interface {
	Count() (uint64, error)
	FindById(*Entity, Id) error
	Find(map[string]interface{}) ([]*Entity, error)
	Save(*Entity) error
	SaveAll([]*Entity) error
	ExistsById(Id) (bool, error)
	DeleteById(Id) error
}

Jump to

Keyboard shortcuts

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