database

package
v0.0.0-...-e964040 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrorInvaildDsn invalid addrs
	ErrorInvaildDsn = errors.New("database: invalid dsn")
	// ErrorDatabaseNil db is not initialized or closed
	ErrorDatabaseNil = errors.New("database: db is not initialized or closed")
)

Functions

This section is empty.

Types

type Driver

type Driver string
const (
	// DriverMysql mysql
	DriverMysql Driver = "mysql"
	// DriverPostgres postgres
	DriverPostgres Driver = "posrgres"
)

func (Driver) String

func (d Driver) String() string

String .

type Options

type Options struct {
	// Address address
	Address string
	// MaxIdleConns 连接池空闲连接数
	MaxIdleConns int
	// MaxOpenConns 连接池最大连接数
	MaxOpenConns int
}

Options .

func DefaultOptions

func DefaultOptions() *Options

DefaultOptions .

Directories

Path Synopsis
orm

Jump to

Keyboard shortcuts

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