Documentation ¶
Overview ¶
TODO: Remove before merge
Index ¶
- type DatabaseQuery
- func (db DatabaseQuery) GetFields() []string
- func (db DatabaseQuery) GetQuery() *DatabaseQueryQuery
- func (db DatabaseQuery) GetSorts() []string
- func (db *DatabaseQuery) SetField(sort string) Queryinterface
- func (db *DatabaseQuery) SetQuery(query *DatabaseQueryQuery) Queryinterface
- func (db *DatabaseQuery) SetSort(sort string) Queryinterface
- type DatabaseQueryQuery
- type Databaseprovider
- type Mongoprovider
- type Queryinterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DatabaseQuery ¶
type DatabaseQuery struct { Sorts []string `json:"sorts,omitempty"` Query *DatabaseQueryQuery `json:"query,omitempty"` Fields []string `json:"fields,omitempty"` }
func (DatabaseQuery) GetFields ¶
func (db DatabaseQuery) GetFields() []string
func (DatabaseQuery) GetQuery ¶
func (db DatabaseQuery) GetQuery() *DatabaseQueryQuery
func (DatabaseQuery) GetSorts ¶
func (db DatabaseQuery) GetSorts() []string
func (*DatabaseQuery) SetField ¶
func (db *DatabaseQuery) SetField(sort string) Queryinterface
func (*DatabaseQuery) SetQuery ¶
func (db *DatabaseQuery) SetQuery(query *DatabaseQueryQuery) Queryinterface
func (*DatabaseQuery) SetSort ¶
func (db *DatabaseQuery) SetSort(sort string) Queryinterface
type DatabaseQueryQuery ¶
type Databaseprovider ¶
type Databaseprovider interface { Query(Queryinterface) string Do(Queryinterface) []byte }
func NewMongodbProvider ¶
func NewMongodbProvider(client *mongo.Database) Databaseprovider
type Mongoprovider ¶
func (Mongoprovider) Do ¶
func (mdb Mongoprovider) Do(query Queryinterface) []byte
func (Mongoprovider) Query ¶
func (mdb Mongoprovider) Query(query Queryinterface) string
type Queryinterface ¶
type Queryinterface interface { SetSort(string) Queryinterface GetSorts() []string SetQuery(*DatabaseQueryQuery) Queryinterface GetQuery() *DatabaseQueryQuery SetField(string) Queryinterface GetFields() []string }
func NewQuery ¶
func NewQuery() Queryinterface
Click to show internal directories.
Click to hide internal directories.