Created
November 21, 2015 23:31
-
-
Save enginkartal/1bf6763d95ecf1ebaeb3 to your computer and use it in GitHub Desktop.
MongoDB Equality Condition
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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