package
1.0.20
Repository: https://github.com/hero1s/golib.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
Package orm provide ORM for MySQL/PostgreSQL/sqlite Simple Usage package main import ( "fmt" "github.com/astaxie/beego/orm" _ "github.com/go-sql-driver/mysql" // import your used driver ) // Model Struct type User struct { Id int `orm:"auto"` Name string `orm:"size(100)"` } func init() { orm.RegisterDataBase("default", "mysql", "root:root@/my_db?charset=utf8", 30) } func main() { o := orm.NewOrm() user := User{Name: "slene"} // insert id, err := o.Insert(&user) // update user.Name = "astaxie" num, err := o.Update(&user) // read one u := User{Id: user.Id} err = o.Read(&u) // delete num, err = o.Delete(&u) } more docs: http://beego.me/docs/mvc/model/overview.md.

# Functions

init mysql params(30, 500,int64(10*time.Minute)).
No description provided by the author
No description provided by the author

# Structs

读取mysql的配置, 初始化mysql.
No description provided by the author