Documentation ¶
Index ¶
Constants ¶
View Source
const ( FILTER = "filter" SORT = "sort" PAGE = "page" ASC = "ASC" DESC = "DESC" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func NewQueryBuilder ¶
func (*Builder) BuildQuery ¶
type Pagination ¶
type Query ¶
type Query struct { Filters map[string]interface{} `json:"filter"` Sort []Sorting `json:"sort"` Page Pagination `json:"page"` // derived from Filters Filter Filter }
func (*Query) UnmarshalJSON ¶
type Visitor ¶
type Visitor interface { // returns "equal" expression VisitEQ(*EQ) (string, error) // returns "in" expression VisitIN(*IN) (string, error) // returns "and" expression VisitAND(*AND) (string, error) // returns "or" expression VisitOR(*OR) (string, error) // receives concatenated filters and finalizes the native query Finalize(string, *Query) error }
Click to show internal directories.
Click to hide internal directories.