postgres

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Postgres

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

Postgres Postgres

func NewPostgres

func NewPostgres(connStr string, debug bool) *Postgres

NewPostgres New Postgres

func NewPostgres2

func NewPostgres2(userName, password, host, dbName string, port int, debug bool) *Postgres

NewPostgres2 New Postgres

func (*Postgres) Close

func (m *Postgres) Close()

Close 关闭

func (*Postgres) DB

func (m *Postgres) DB() *gorm.DB

DB DB

func (*Postgres) PageQuery

func (m *Postgres) PageQuery(db *gorm.DB, pageSize, pageIndex int64, result interface{}) (records int64, pages int64, err error)

PageQuery 分页查询

Jump to

Keyboard shortcuts

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