gormrepo

package
v0.0.0-...-3215105 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GORMRepository

type GORMRepository struct {
	// contains filtered or unexported fields
}

GORMRepository is an implementation of Repository interface for 'jinzhu/gorm' package. It is composed of *gorm.DB and dberrors.Converter.

func New

func New(db *gorm.DB) (*GORMRepository, error)

func (*GORMRepository) Count

func (g *GORMRepository) Count(req interface{}) (count int, dberr *dberrors.Error)

func (*GORMRepository) Create

func (g *GORMRepository) Create(req interface{}) *dberrors.Error

func (*GORMRepository) Delete

func (g *GORMRepository) Delete(req, where interface{}) *dberrors.Error

func (*GORMRepository) Get

func (g *GORMRepository) Get(req interface{}) (res interface{}, dberr *dberrors.Error)

func (*GORMRepository) List

func (g *GORMRepository) List(
	req interface{},
) (res interface{}, dberr *dberrors.Error)

func (*GORMRepository) ListWithParams

func (g *GORMRepository) ListWithParams(
	req interface{}, params *repository.ListParameters,
) (res interface{}, dberr *dberrors.Error)

func (*GORMRepository) Patch

func (g *GORMRepository) Patch(req, where interface{}) (dberr *dberrors.Error)

func (*GORMRepository) Update

func (g *GORMRepository) Update(req interface{}) (dberr *dberrors.Error)

Jump to

Keyboard shortcuts

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