Beispiel #1
0
func main() {

	fmt.Printf("Start DB ....")
	logger, _ := utils.New("logname")

	logger.Info("info...")
	db := dl.NewSDatabase("testdb", "./", logger)
	db.AddData(nil)

}
Beispiel #2
0
// CreateDB function description : 创建DB
// params :
// return :
func (this *SEngine) CreateDB(dbname string) error {

	this.db = dl.NewSDatabase(dbname, this.Pathname, this.Logger)

	if thie.db == nil {
		return fmt.Errorf("Create DB Error ")
	}

	return nil

}