Skip to content

89hmdys/orm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

orm

起因

  • 每次都存取map太麻烦了...

怎么用?

初始化

var client orm.Client //先声明一个client 嗯,可以是全局的说

func init(){
	c, err := mysql.NewDefault("链接字符串")
	//初始化这个client,先引入github.com/go-sql-driver/mysql驱动
    if err != nil {

	    c.Close()

	    return
    }
    client = c 
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages