Documentation ¶ Index ¶ type Postgres func NewPostgres(connStr string, debug bool) *Postgres func NewPostgres2(userName, password, host, dbName string, port int, debug bool) *Postgres func (m *Postgres) Close() func (m *Postgres) DB() *gorm.DB func (m *Postgres) PageQuery(db *gorm.DB, pageSize, pageIndex int64, result interface{}) (records int64, pages int64, err error) 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 分页查询 Source Files ¶ View all Source files postgres.go Click to show internal directories. Click to hide internal directories.