db

package
v0.0.0-...-6464992 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2015 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VoidAttr

func VoidAttr(obj *InfoObject, attrs ...string) int

Types

type InfoFetcher

type InfoFetcher interface {
	CreateTable() int
	SelectRows(string) ([]InfoObject, int)
	SelectRowsCount(string) (int64, int)
	InsertRow(string) (int64, int)
	DeleteRow(string) int
	UpdateRow(int64, string) int
	Add(*restful.Request, *restful.Response)
	Update(*restful.Request, *restful.Response)
	Del(*restful.Request, *restful.Response)
	Get(*restful.Request, *restful.Response)
}

type InfoObject

type InfoObject struct {
	Id     int64
	Status int64
	Info   string //this contains all the info which will be decoded by js.
}

type InfoTable

type InfoTable struct {
	Dbfile    string
	Tablename string
	Keyattrs  []string
}

func (InfoTable) Add

func (infotable InfoTable) Add(req *restful.Request, resp *restful.Response)

func (InfoTable) AlterTable

func (infotable InfoTable) AlterTable() int

func (InfoTable) CreateTable

func (infotable InfoTable) CreateTable() int

func (InfoTable) Del

func (infotable InfoTable) Del(req *restful.Request, resp *restful.Response)

func (InfoTable) DeleteRow

func (infotable InfoTable) DeleteRow(infostr string) int

func (InfoTable) Get

func (infotable InfoTable) Get(req *restful.Request, resp *restful.Response)

func (InfoTable) InsertRow

func (infotable InfoTable) InsertRow(infostr string) (int64, int)

func (InfoTable) SelectRows

func (infotable InfoTable) SelectRows(sqlstr string) ([]InfoObject, int)

func (InfoTable) SelectRowsCount

func (infotable InfoTable) SelectRowsCount(sqlstr string) (int64, int)

func (InfoTable) Update

func (infotable InfoTable) Update(req *restful.Request, resp *restful.Response)

func (InfoTable) UpdateRow

func (infotable InfoTable) UpdateRow(id int64, infostr string) int

Jump to

Keyboard shortcuts

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