示例#1
0
文件: main.go 项目: mabetle/mdb
package main

import (
	"github.com/mabetle/mdb"
	"github.com/mabetle/mdb/demo/ioc"
)

var (
	db = ioc.GetSql()
)

func main() {
	mdb.NewLinkSql(db).SetTable("demo_table").Print()
}
示例#2
0
文件: main.go 项目: mabetle/mdb
package main

import (
	"github.com/mabetle/mdb/demo"
	"github.com/mabetle/mdb/demo/ioc"
)

var (
	sql = ioc.GetSql()
)

func InitDB() {
	demo.InitDB(sql)
}

func main() {
	InitDB()
}