Example #1
0
File: sql.go Project: Centny/dbm
func AddDbL(key, driver, url string, idle, max int) error {
	mdbs, err := dbm.NewMDbs(NewSQL_H(driver, url, idle, max))
	if err == nil {
		DbL[key] = mdbs
	}
	return err
}
Example #2
0
File: mgo.go Project: Centny/dbm
func AddDbL(key, url, name string) error {
	mdbs, err := dbm.NewMDbs(NewMGO_H(url, name))
	if err == nil {
		DbL[key] = mdbs
	}
	return err
}
Example #3
0
File: mgo.go Project: Centny/dbm
func NewMDbs(url, name string) (*MDbs, error) {
	mdbs, err := dbm.NewMDbs(NewMGO_H(url, name))
	return &MDbs{MDbs: mdbs}, err
}