manager

package
v0.0.0-...-6eb671c Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2017 License: MIT Imports: 5 Imported by: 4

Documentation

Index

Constants

View Source
const DefaultIdColumn = "id"

Variables

This section is empty.

Functions

This section is empty.

Types

type EntityDbManager

type EntityDbManager struct {
	Db        *sql.DB
	EntityMap map[string]string
}

func NewEntityDbManager

func NewEntityDbManager(db *sql.DB) *EntityDbManager

func NewEntityDbManagerWithEntityMap

func NewEntityDbManagerWithEntityMap(db *sql.DB, entityMap map[string]string) *EntityDbManager

func (*EntityDbManager) Btoi

func (em *EntityDbManager) Btoi(b bool) int

func (*EntityDbManager) DeleteEntity

func (em *EntityDbManager) DeleteEntity(entity string, id string) (int64, error)

func (*EntityDbManager) GetEntities

func (em *EntityDbManager) GetEntities(entity string, filterParams map[string]string, limit string, offset string, orderBy string, orderDir string) ([]map[string]interface{}, int, error)

func (*EntityDbManager) GetEntity

func (em *EntityDbManager) GetEntity(entity string, id string) (map[string]interface{}, error)

func (*EntityDbManager) GetIdColumn

func (em *EntityDbManager) GetIdColumn(entity string) string

func (*EntityDbManager) PostEntity

func (em *EntityDbManager) PostEntity(entity string, postData map[string]interface{}) (int64, error)

func (*EntityDbManager) UpdateEntity

func (em *EntityDbManager) UpdateEntity(entity string, id string, updateData map[string]interface{}) (int64, map[string]interface{}, error)

Jump to

Keyboard shortcuts

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