mysql

package module
v1.5.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2024 License: MIT Imports: 9 Imported by: 1

README

cool-admin-go mysql 驱动包

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

使用方法

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

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

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

)

配置

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMysql added in v0.3.0

func NewMysql() cooldb.Driver

Types

type DriverMysql

type DriverMysql struct {
}

func (*DriverMysql) GetConn

func (d *DriverMysql) GetConn(config *gdb.ConfigNode) (db *gorm.DB, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL