dao

package
Version: v0.0.0-...-34171ca Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MyUser database user name
	MyUser = "cloud"
	// Password database user password
	Password = "passwd"
	// Host database host ip
	Host = "192.168.1.61"
	// MPort database host port
	MPort = 3306
	// DbName database db name
	DbName = "mydb"
	// SUCCESS return value
	SUCCESS = "success"
	// Port listen port
	Port = "8080"
)

Variables

This section is empty.

Functions

func CreatePerson

func CreatePerson(person *table.Person) (err error)

func DB

func DB() *gorm.DB

func DeletePersonById

func DeletePersonById(personId int64) (err error)

func GetAllPerson

func GetAllPerson() (persons []*table.Person, err error)

func GetPersonById

func GetPersonById(personId int64) (person *table.Person, err error)

func UpdatePersonNameById

func UpdatePersonNameById(name string, personId int64) (err error)

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL