postgresql

package
v0.0.0-...-97104a7 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2019 License: Apache-2.0 Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB = Postgresql{
	DbList: map[string]*sql.DB{},
}

Functions

This section is empty.

Types

type Postgresql

type Postgresql struct {
	DbList map[string]*sql.DB
	Once   sync.Once
}

func GetPostgresqlDB

func GetPostgresqlDB() *Postgresql

func (*Postgresql) Exec

func (db *Postgresql) Exec(query string, args ...interface{}) sql.Result

func (*Postgresql) ExecWithConnection

func (db *Postgresql) ExecWithConnection(con string, query string, args ...interface{}) sql.Result

func (*Postgresql) GetName

func (db *Postgresql) GetName() string

func (*Postgresql) InitDB

func (db *Postgresql) InitDB(cfgList map[string]config.Database)

func (*Postgresql) Query

func (db *Postgresql) Query(query string, args ...interface{}) ([]map[string]interface{}, *sql.Rows)

func (*Postgresql) QueryWithConnection

func (db *Postgresql) QueryWithConnection(con string, query string, args ...interface{}) ([]map[string]interface{}, *sql.Rows)

Jump to

Keyboard shortcuts

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