cooldb

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2023 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConn

func GetConn(node *gdb.ConfigNode) (db *gorm.DB, err error)

GetConn returns the connection object of specified database driver.

func Register

func Register(name string, driver Driver) error

Register registers custom database driver to gdb.

Types

type Driver

type Driver interface {
	GetConn(node *gdb.ConfigNode) (db *gorm.DB, err error) // 获取数据库连接
}

Driver 数据库驱动通用接口

Jump to

Keyboard shortcuts

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