Skip to content

Instantly share code, notes, and snippets.

@enginkartal
Created November 21, 2015 23:31
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 enginkartal/1bf6763d95ecf1ebaeb3 to your computer and use it in GitHub Desktop.
Save enginkartal/1bf6763d95ecf1ebaeb3 to your computer and use it in GitHub Desktop.
MongoDB Equality Condition
//bu query likes sayısı 5 eşit olan dökümanları getirir.
db.collection.find({likes:5})
//Sonuç
{
_id:ObjectId("507f191e810c19729de860ea"),
title: 'MongoDB Insert',
description: 'MongoDB Kayıt ekleme',
author: 'Engin Kartal',
url: 'http://www.enginkartal.com.tr',
keywors: ['mongodb', 'database', 'insert'],
likes: 5,
comments: [
{
user:'user1',
message: 'My first comment',
dateCreated: new Date(2015,08,29,17,35),
like: 0
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment