sql

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 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 *sql.DB, opts pagination.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() pagination.Pagination

func (*DefaultPaginatedResponse) Rows

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

type PaginatedResponse

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

func QueryPaginated

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