Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 9e0c27b503
Fetching contributors…

Cannot retrieve contributors at this time

31 lines (24 sloc) 0.607 kb
package mongo
import (
"github.com/ungerik/go-start/mgo/bson"
)
///////////////////////////////////////////////////////////////////////////////
// filterQuery
type filterQuery struct {
filterQueryBase
selector string
value interface{}
}
func (self *filterQuery) bsonSelector() bson.M {
return bson.M{self.selector: self.value}
}
func (self *filterQuery) Selector() string {
// Don't return special selectors that start with $
if self.selector != "" && self.selector[0] == '$' {
return ""
}
return self.selector
}
//func (self *filterQuery) Value() interface{} {
// return self.value
//}
Jump to Line
Something went wrong with that request. Please try again.