Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save muhammadghazali/9742313 to your computer and use it in GitHub Desktop.
Save muhammadghazali/9742313 to your computer and use it in GitHub Desktop.
Muhammad Ghazali's Online Notes: Gunakan native method untuk melakukan custom query di sails-mongo
Station.native(function(err, collection) {
collection.find({
location: {
$near: {
$geometry: {
type: "Point",
// coordinates: [longitude, latitude]
coordinates: [50, 50]
}
},
$maxDistance: 10000
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment