models

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Modelslist map[string]Model = map[string]Model{
	"test-model": &Model_Test,
}

modelslist.go contains your models

Functions

This section is empty.

Types

type Model

type Model interface {
	Init(db *sql.DB) error
	Update() error
	RawExec(string) (sql.Result, error)
	GetRows() *sql.Rows
}

type Test added in v0.9.6

type Test struct {
	TableName string
	Rows      *sql.Rows
	Db        *sql.DB
}
var Model_Test Test = Test{}

func (*Test) GetRows added in v0.9.6

func (m *Test) GetRows() *sql.Rows

func (*Test) Init added in v0.9.6

func (m *Test) Init(db *sql.DB) error

func (*Test) RawExec added in v0.9.6

func (m *Test) RawExec(query string) (sql.Result, error)

func (*Test) Update added in v0.9.6

func (m *Test) Update() error

Jump to

Keyboard shortcuts

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