rdbms

package
v0.0.40 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMySQL

func NewMySQL(config MySQLConfig) (*sql.DB, error)

Types

type MySQLConfig

type MySQLConfig struct {
	Host           string
	Port           string
	Username       string
	Password       string
	Database       string
	MaxIdleCons    int
	ConMaxLifetime time.Duration
}

type Paginator

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

func NewPaginator

func NewPaginator(sortDefault string, allowedSortFields map[string]string) Paginator

func (Paginator) Limit

func (p Paginator) Limit(size, maxSize int) int

func (Paginator) Offset

func (p Paginator) Offset(page, limit int) int

func (Paginator) OrderBy

func (p Paginator) OrderBy(sortFields []string) string

func (Paginator) Page

func (p Paginator) Page(page int) int

Jump to

Keyboard shortcuts

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