Skip to content

go-impatient/go-paginate

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Paginate - Go package to generate query pagination

Reference Release Software License Test status Coverage


Why?

This project is part of my personal portfolio, so, I'll be happy if you could provide me any feedback about the project, code, structure or anything that you can report that could make me a better developer!

Email-me: boscardinvinicius@gmail.com

Connect with me at LinkedIn.


Functionalities

  • Generate query and query count pagination for postgresql

Starting

Installation

go get github.com/booscaaa/go-paginate

Usage

import "github.com/booscaaa/go-paginate/paginate"

query, queryCount, err := paginate.
		Paginate("SELECT id, name FROM user").
		Sort([]string{"name", "last_name"}).
		Desc([]string{"true", "false"}).
		Page(1).
		RowsPerPage(50).
		SearchBy("vinicius").
		Query()

if err != nil {
  //handler error
}

// else use the query and queryCount to paginate with pq, pgx or other

Contributing

You can send how many PR's do you want, I'll be glad to analyze and accept them! And if you have any question about the project...

Email-me: boscardinvinicius@gmail.com

Connect with me at LinkedIn

Thank you!

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%