sql

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: BSD-3-Clause Imports: 7 Imported by: 5

README

go-pagination-sql

Important

This is work in progress. Documentation to follow.

See also

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func QueryPaginatedAll

func QueryPaginatedAll(db *gosql.DB, opts pagination.Options, cb PaginatedResponseCallback, query string, args ...interface{}) error

Types

type DefaultPaginatedResponse

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

func (*DefaultPaginatedResponse) Results added in v0.2.0

func (r *DefaultPaginatedResponse) Results() pagination.Results

func (*DefaultPaginatedResponse) Rows

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

type PaginatedResponse

type PaginatedResponse interface {
	Rows() *gosql.Rows
	Results() pagination.Results
}

func QueryPaginated

func QueryPaginated(db *gosql.DB, opts pagination.Options, 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