godb

package
v0.0.0-...-a780a43 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	Username        string // 数据库用户名
	Password        string // 数据库密码
	Host            string // 数据库地址
	Port            string // 数据库端口
	Database        string // 库名
	Prefix          string // 表前缀
	Charset         string // 字符集
	Driver          string // 数据库驱动 mysql/sqlite/oracle/mssql/postgres
	EnableQueryLog  bool   // 是否开启sql日志
	SetMaxOpenConns int    // (连接池)最大打开的连接数,默认值为0表示不限制
	SetMaxIdleConns int    // (连接池)闲置的连接数
}

type ConnectionBase

type ConnectionBase struct {
	gorose.Connection
}

func GetDb

func GetDb(filename, name string) *ConnectionBase

通过ini配置文件

func Instance

func Instance(args ...interface{}) *ConnectionBase

Jump to

Keyboard shortcuts

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