I am trying to do a like
query using mgo with no luck.
what I want is a mongodb query similar to
db.organisation.find( { "permalink" : /org.*/ } )
I am still stuck at
sess.DB(db).C(cApp).
Find(bson.M{"permalink": "org:bms.*"}).
All(&m)
Use bson.Regex to specify a regular expression value:
sess
.DB(db)
.C(cApp)
.Find(bson.M{"permalink": bson.RegEx{"org.*", ""}})
.All(&m)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With