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.
- Generate query and query count pagination for postgresql
go get github.com/booscaaa/go-paginate
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
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!
This project is licensed under the MIT License - see the LICENSE.md file for details