model2

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusCreated string = "created"
	StatusUpdated string = "updated"
	StatusDeleted string = "deleted"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model interface {
	Table() database.Table

	GetList(whereSql string, args ...interface{}) ([]interface{}, error)
	Get(whereSql string, args ...interface{}) (interface{}, error)
	Create(resource interface{}, context interface{}) error
	Update(resource interface{}, context interface{}, whereSql string, args ...interface{}) error
	Delete(context interface{}, whereSql string, args ...interface{}) error
	Sync() error
	SyncSingle(whereSql string, args ...interface{}) (interface{}, error)
}

func New

func New(db database.Database, resource interface{}, topic string, isCache bool, tableName string) (Model, error)

Jump to

Keyboard shortcuts

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