You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
676 B

  1. package initialize
  2. // sqlite需要gcc支持 windows用户需要自行安装gcc 如需使用打开注释即可
  3. // 感谢 sqlitet提供者 [rikugun] 作者github: https://github.com/rikugun
  4. //import (
  5. // "fmt"
  6. // "gin-vue-admin/global"
  7. // "github.com/jinzhu/gorm"
  8. // _ "github.com/jinzhu/gorm/dialects/sqlite"
  9. //)
  10. //
  11. ////初始化数据库并产生数据库全局变量
  12. //func Sqlite() {
  13. // admin := global.GVA_CONFIG.Sqlite
  14. // if db, err := gorm.Open("sqlite3", fmt.Sprintf("%s?%s", admin.Path,admin.Config)); err != nil {
  15. // global.GVA_LOG.Error("DEFAULTDB数据库启动异常", err)
  16. // } else {
  17. // global.GVA_DB = db
  18. // global.GVA_DB.LogMode(admin.LogMode)
  19. // }
  20. //}