pagination

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2021 License: BSD-3-Clause Imports: 7 Imported by: 0

README

go-sql-pagination

Important

Too soon. Move along.

Install

You will need to have both Go (specifically a version of Go more recent than 1.6 so let's just assume you need Go 1.8 or higher) and the make programs installed on your computer. Assuming you do just type:

make bin

All of this package's dependencies are bundled with the code in the vendor directory.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func QueryPaginatedAll

func QueryPaginatedAll(db *sql.DB, opts aa.PaginationOptions, cb PaginatedResponseCallback, query string, args ...interface{}) error

Types

type DefaultPaginatedResponse

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

func (*DefaultPaginatedResponse) Pagination

func (r *DefaultPaginatedResponse) Pagination() aa.Pagination

func (*DefaultPaginatedResponse) Rows

func (r *DefaultPaginatedResponse) Rows() *sql.Rows

type PaginatedResponse

type PaginatedResponse interface {
	Rows() *sql.Rows
	Pagination() aa.Pagination
}

func QueryPaginated

func QueryPaginated(db *sql.DB, opts aa.PaginationOptions, query string, args ...interface{}) (PaginatedResponse, error)

type PaginatedResponseCallback

type PaginatedResponseCallback func(PaginatedResponse) error

Jump to

Keyboard shortcuts

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