crudmgr

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 31, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OP_C = "C"
	OP_R = "R"
	OP_U = "U"
	OP_D = "D"
)

Variables

This section is empty.

Functions

func Create

func Create[T model.VO](opts *CrudOpts[T]) (interface{}, error)

func Delete

func Delete[T model.VO](opts *CrudOpts[T]) (interface{}, error)

func Handle

func Handle[T model.VO](a T) error

func Retrieve

func Retrieve[T model.VO](tp reflect.Type, opts *CrudOpts[T]) (interface{}, error)

func Update

func Update[T model.VO](opts *CrudOpts[T]) (interface{}, error)

Types

type CrudOpts

type CrudOpts[T model.VO] struct {
	Op           string
	Db           string
	Tb           string
	Where        []interface{}
	ID           interface{}
	Data         T //string
	Cols         []interface{}
	Associations []string
	Limit        int
	Offset       int
}

func (*CrudOpts[T]) SetData

func (co *CrudOpts[T]) SetData(i T)

Jump to

Keyboard shortcuts

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