postgresql

package
v0.0.0-...-d2770bb Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(cnf Info) (*gorm.DB, error)

Open 获取一个数据库连接

func OpenPlus

func OpenPlus(cnf Info) (*sql.DB, error)

OpenPlus 获取一个数据库连接

Types

type Info

type Info struct {
	Host     string
	Port     string
	Database string
	Username string
	Password string
	SslMode  string
	TimeZone string
}

Info 初始化连接信息

Jump to

Keyboard shortcuts

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