Documentation ¶
Index ¶
- func BuildQueryFields(fields map[string]string) string
- func BuildQueryFilter(filters []FilterParameter, mapFields map[string]string) (query string, values []interface{}, qtd int)
- func BuildQueryFilterPage(filters []FilterParameter, pageable Pageable, mapFields map[string]string, ...) ([]interface{}, []interface{}, string, string)
- func BuildQueryPage(qtd int) (query string)
- func BuildQuerySort(page Pageable) string
- func BuildSelectQuery(fields map[string]string, strQueryFrom string, strQueryPage string, ...) (SQL, SQLCount)
- func TotalPage(pageSize int32, totalElements int64) int32
- type FilterParameter
- type Operator
- type Page
- type PageData
- func (p PageData) GetContent() interface{}
- func (p PageData) GetNumberOfElements() int32
- func (p PageData) GetPageNumber() int32
- func (p PageData) GetPageSize() int32
- func (p PageData) GetTotalElements() int64
- func (p PageData) GetTotalPage(pageSize int32, totalElements int64) int32
- func (p PageData) GetTotalPages() int32
- type Pageable
- type PageableData
- func (p PageableData) First() Pageable
- func (p PageableData) GetOffset() int32
- func (p PageableData) GetPageNumber() int32
- func (p PageableData) GetPageSize() int32
- func (p PageableData) GetSort() map[string]string
- func (p PageableData) HasPrevious() bool
- func (p PageableData) Next() Pageable
- func (p PageableData) PreviousOrFirst() Pageable
- type Report
- type SQL
- type SQLCount
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildQueryFields ¶
func BuildQueryFilter ¶
func BuildQueryFilter(filters []FilterParameter, mapFields map[string]string) (query string, values []interface{}, qtd int)
func BuildQueryFilterPage ¶
func BuildQueryPage ¶
func BuildQuerySort ¶
func BuildSelectQuery ¶
Types ¶
type FilterParameter ¶
type Page ¶
type Page interface { // total number of pages GetTotalPages() int32 // total number of items GetTotalElements() int64 // current page number GetPageNumber() int32 // page size GetPageSize() int32 // number of items on the current page GetNumberOfElements() int32 // list of items on this page GetContent() interface{} }
type PageData ¶
type PageData struct { TotalPage int32 TotalElements int64 PageNumber int32 PageSize int32 PageNumberOfElements int32 Content interface{} }
func (PageData) GetContent ¶
func (p PageData) GetContent() interface{}
func (PageData) GetNumberOfElements ¶
func (PageData) GetPageNumber ¶
func (PageData) GetPageSize ¶
func (PageData) GetTotalElements ¶
func (PageData) GetTotalPage ¶
func (PageData) GetTotalPages ¶
type Pageable ¶
type Pageable interface { /** * Returns the page to be returned. * * @return the page to be returned. */ GetPageNumber() int32 /** * Returns the number of items to be returned. * * @return the number of items of that page */ GetPageSize() int32 GetOffset() int32 /** * Returns the sorting parameters. * * @return */ GetSort() map[string]string /** * Returns the {@link Pageable} requesting the next {@link Page}. * * @return */ Next() Pageable /** * Returns the previous {@link Pageable} or the first {@link Pageable} if the current one already is the first one. * * @return */ PreviousOrFirst() Pageable /** * Returns the {@link Pageable} requesting the first page. * * @return */ First() Pageable /** * Returns whether there's a previous {@link Pageable} we can access from the current one. Will return * {@literal false} in case the current {@link Pageable} already refers to the first page. * * @return */ HasPrevious() bool }
type PageableData ¶
func (PageableData) First ¶
func (p PageableData) First() Pageable
func (PageableData) GetOffset ¶
func (p PageableData) GetOffset() int32
func (PageableData) GetPageNumber ¶
func (p PageableData) GetPageNumber() int32
func (PageableData) GetPageSize ¶
func (p PageableData) GetPageSize() int32
func (PageableData) GetSort ¶
func (p PageableData) GetSort() map[string]string
func (PageableData) HasPrevious ¶
func (p PageableData) HasPrevious() bool
func (PageableData) Next ¶
func (p PageableData) Next() Pageable
func (PageableData) PreviousOrFirst ¶
func (p PageableData) PreviousOrFirst() Pageable
Click to show internal directories.
Click to hide internal directories.