persistence

package
v0.0.0-...-fe735be Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(value interface{}) error

Create ...

func DeleteByID

func DeleteByID(model interface{}, id uint64) (count int64, err error)

DeleteByID ...

func DeleteByIDS

func DeleteByIDS(model interface{}, ids []uint64) (count int64, err error)

DeleteByIDS ...

func DeleteByModel

func DeleteByModel(model interface{}) (count int64, err error)

DeleteByModel ...

func DeleteByWhere

func DeleteByWhere(model, where interface{}) (count int64, err error)

DeleteByWhere ...

func Find

func Find(where interface{}, out interface{}, associations []string, orders ...string) error

Find ...

func First

func First(where interface{}, out interface{}, associations []string) (notFound bool, err error)

First ...

func FirstByID

func FirstByID(out interface{}, id string) (notFound bool, err error)

FirstByID ...

func Save

func Save(value interface{}) error

Save ...

func Scan

func Scan(model, where interface{}, out interface{}) (notFound bool, err error)

Scan ...

func ScanList

func ScanList(model, where interface{}, out interface{}, orders ...string) error

ScanList ...

func Updates

func Updates(where interface{}, value interface{}) error

Updates ...

Types

type TaskRepository

type TaskRepository struct{}

TaskRepository ...

func GetTaskRepository

func GetTaskRepository() *TaskRepository

GetTaskRepository ...

func (*TaskRepository) Add

func (r *TaskRepository) Add(task *models.Task) error

Add ...

func (*TaskRepository) All

func (r *TaskRepository) All() (*[]models.Task, error)

All ...

func (*TaskRepository) Delete

func (r *TaskRepository) Delete(task *models.Task) error

Delete ...

func (*TaskRepository) Get

func (r *TaskRepository) Get(id string) (*models.Task, error)

Get ...

func (*TaskRepository) Query

func (r *TaskRepository) Query(q *models.Task) (*[]models.Task, error)

Query ...

func (*TaskRepository) Update

func (r *TaskRepository) Update(task *models.Task) error

Update ...

type UserRepository

type UserRepository struct{}

UserRepository ...

func GetUserRepository

func GetUserRepository() *UserRepository

GetUserRepository ...

func (*UserRepository) Add

func (r *UserRepository) Add(user *models.User) error

Add ...

func (*UserRepository) All

func (r *UserRepository) All() (*[]models.User, error)

All ...

func (*UserRepository) Delete

func (r *UserRepository) Delete(user *models.User) error

Delete ...

func (*UserRepository) Get

func (r *UserRepository) Get(id string) (*models.User, error)

Get ...

func (*UserRepository) GetByUsername

func (r *UserRepository) GetByUsername(username string) (*models.User, error)

GetByUsername ...

func (*UserRepository) Query

func (r *UserRepository) Query(q *models.User) (*[]models.User, error)

Query ...

func (*UserRepository) Update

func (r *UserRepository) Update(user *models.User) error

Update ...

Jump to

Keyboard shortcuts

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