postgresql

package
v0.0.0-...-6667eb6 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrRecordNotFound = "record not found"

ErrRecordNotFound 查找结果为空的错误字符串

Functions

This section is empty.

Types

type Config

type Config struct {
	Debug      bool `toml:"debug"`
	NodeConfig *NodeConfig
}

Config mysql对外配置

type DB

type DB = gorm.DB

DB 避免业务代码直接引用gorm

type NodeConfig

type NodeConfig struct {
	Host    string `toml:"host"`
	MaxIdle int    `toml:"max_idle"`
	MaxOpen int    `toml:"max_open"`
	MaxLife int    `toml:"max_life"`
}

NodeConfig 一个实例配置

type Pool

type Pool struct {
	// contains filtered or unexported fields
}

Pool mysql连接池再封装

func NewPool

func NewPool(conf *Config) *Pool

NewPool 初始化mysql连接池

Jump to

Keyboard shortcuts

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