Quantcast
Channel: How to query MongoDB with "like" - Stack Overflow
Viewing all articles
Browse latest Browse all 48

Answer by user2312578 for How to query MongoDB with "like"?

$
0
0

In Go and the mgo driver:

Collection.Find(bson.M{"name": bson.RegEx{"m", ""}}).All(&result)

where result is the struct instance of the sought after type


Viewing all articles
Browse latest Browse all 48

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>