model

package
v0.0.0-...-fa0393c Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DbInit

func DbInit()

Types

type Field

type Field struct {
	Name     string `db:"field" json:"field"`
	DBColumn string `db:"colname" json:"colname"`
	DBType   string `db:"coltype" json:"coltype"`
}

type Model

type Model struct {
	Name   string `db:"name" json:"name"`
	Fields []*Field
}

type ModelMap

type ModelMap struct {
	Models []*Model
	DB     *sqlx.DB
}

func InitModelMap

func InitModelMap() *ModelMap

func NewModelMap

func NewModelMap() (*ModelMap, error)

func (*ModelMap) GetSelect

func (m *ModelMap) GetSelect(name string) (string, error)

Jump to

Keyboard shortcuts

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