mysql

package
v0.0.0-...-eb64f0e Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pool

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

Pool represents the database connection pool.

func InitPool

func InitPool(db string) *Pool

InitPool initialize the connection pool.

func NewPool

func NewPool(db string, size int) *Pool

NewPool create a Pool according to the specified db and pool size.

func (*Pool) Close

func (p *Pool) Close()

Close close the pool.

func (*Pool) Get

func (p *Pool) Get() (orm.Connection, error)

Get get a connection from the pool.

func (*Pool) Release

func (p *Pool) Release(v orm.Connection)

Release put the connection back into the pool.

Jump to

Keyboard shortcuts

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