Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SimpleQueryBuilder ¶
type SimpleQueryBuilder struct {
// contains filtered or unexported fields
}
SimpleQueryBuilder is a simple MongoDB query builder.
func (*SimpleQueryBuilder) Build ¶
func (q *SimpleQueryBuilder) Build() bson.M
Build returns the result of the query builder as a bson.M. If Build() is called on a nil value it returns an empty bson.M that would match all documents.
func (*SimpleQueryBuilder) String ¶
func (q *SimpleQueryBuilder) String() string
func (*SimpleQueryBuilder) Where ¶
func (q *SimpleQueryBuilder) Where(key string, operator string, value interface{}) *SimpleQueryBuilder
Where matches MongoDB documents where key matches value using operator. If Where overwrites any other "where clause" that used the same key and operator.
func (*SimpleQueryBuilder) WhereIn ¶
func (q *SimpleQueryBuilder) WhereIn(key string, value interface{}) *SimpleQueryBuilder
WhereIn searches from MongoDB documents where the value of key is in a list of values. WhereIn addes value to this list of queried values.
Click to show internal directories.
Click to hide internal directories.