db

package
v0.16.1-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(db *gorm.DB)

func GetConnection

func GetConnection() *gorm.DB

func Paginate

func Paginate(value interface{}, pagination *Pagination, db *gorm.DB) func(db *gorm.DB) *gorm.DB

Types

type Pagination

type Pagination struct {
	Limit  int    `json:"limit"`
	Offset int    `json:"offset"`
	Sort   string `json:"sort"`
}

func (*Pagination) GetLimit

func (p *Pagination) GetLimit() int

func (*Pagination) GetOffset

func (p *Pagination) GetOffset() int

func (*Pagination) GetSort

func (p *Pagination) GetSort() string

Jump to

Keyboard shortcuts

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