Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/cool-team-official/cool-admin-go/contrib/drivers/sqlite

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/cool-team-official/cool-admin-go/contrib/drivers/sqlite

  • v1.5.11
  • Source
  • Go
  • Socket score

Version published
Created
Source

cool-admin-go sqlite 驱动包

扩展了 GoFrame 的 sqlite 包,集成了 gorm 相关功能.

使用方法

引入规则应早于 modules相关引入,建议在 main.go 中进行引入。

import (
    _ "github.com/cool-team-official/cool-admin-go/contrib/drivers/sqlite"

    // 换行然后再入模块包,防止编辑器自动排序导致引入顺序错乱
    _ "github.com/cool-team-official/cool-admin-go/modules/base"

)

配置

database:
  default:
    type: "sqlite" # 数据库类型
    name: "cool.sqlite" # 数据库名称,对于sqlite来说就是数据库文件名
    extra: busy_timeout=5000 # 扩展参数 如 busy_timeout=5000&journal_mode=ALL
    createdAt: "createTime" # 创建时间字段名称
    updatedAt: "updateTime" # 更新时间字段名称
    debug: true # 开启调试模式,启用后将在控制台打印相关sql语句

FAQs

Package last updated on 07 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc