Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultQueryBuilder ¶
type DefaultQueryBuilder struct {
// contains filtered or unexported fields
}
DefaultQueryBuilder allows to create basic queries dynamically/programmatically
func (*DefaultQueryBuilder) GetFields ¶
func (qb *DefaultQueryBuilder) GetFields() []string
GetFields returns the selected fields
func (*DefaultQueryBuilder) GetFilters ¶
func (qb *DefaultQueryBuilder) GetFilters() map[string]interface{}
GetFilters returns all conditions to filter data
func (*DefaultQueryBuilder) Where ¶
func (qb *DefaultQueryBuilder) Where(field string, value interface{})
Where allows adding conditions to filter data
func (*DefaultQueryBuilder) WithFields ¶
func (qb *DefaultQueryBuilder) WithFields(fields ...string)
WithFields selects the specified fields
type QueryBuilder ¶
type QueryBuilder interface { // GetFields returns the selected fields GetFields() []string // GetFilters returns all conditions to filter data GetFilters() map[string]interface{} // Where allows adding conditions to filter data Where(string, interface{}) // WithFields selects the specified fields WithFields(...string) }
QueryBuilder allows to create queries dynamically/programmatically
func NewDefaultQueryBuilder ¶
func NewDefaultQueryBuilder() QueryBuilder
NewDefaultQueryBuilder creates a new instance of QueryBuilder
Click to show internal directories.
Click to hide internal directories.