repository

package
v0.0.0-...-8b3168d Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

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

func NewRepository

func NewRepository(db *gorm.DB, joins ...string) *Repository

func (*Repository) Create

func (r *Repository) Create(target any) error

func (*Repository) DBWithPreloads

func (r *Repository) DBWithPreloads(preloads []string) *gorm.DB

func (*Repository) Delete

func (r *Repository) Delete(target any, id int32) error

func (*Repository) FindAll

func (r *Repository) FindAll(target any, preloads ...string) error

func (*Repository) FindById

func (r *Repository) FindById(target any, id int32, preloads ...string) error

func (*Repository) HandleError

func (r *Repository) HandleError(res *gorm.DB) error

func (*Repository) Update

func (r *Repository) Update(target any) error

func (*Repository) UpdateColumn

func (r *Repository) UpdateColumn(target any, id int32, column string, value any) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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