db.getProfilingLevel()
0
db.setProfilingLevel(2)
{ "was" : 0, "slowms" : 100, "sampleRate" : 1, "ok" : 1 }
db.getProfilingLevel()
2
db.getProfilingLevel()
0
db.setProfilingLevel(2)
{ "was" : 0, "slowms" : 100, "sampleRate" : 1, "ok" : 1 }
db.getProfilingLevel()
2
show dbs
admin 0.000GB
config 0.000GB
local 0.000GB
use fullstack
switched to db fullstack
show collections
db.students.insert({"name": "Mo", "marks": 99})
WriteResult({ "nInserted" : 1 })
db.students.find()
{ "_id" : ObjectId("5c23a9ea11bebd0c676e00dd"), "name" : "Mo", "marks" : 99 }
db.students.insert({"Object": "Table", "price": 120, "location": "Sydney"})
WriteResult({ "nInserted" : 1 })
db.students.find()
{ "_id" : ObjectId("5c23a9ea11bebd0c676e00dd"), "name" : "Mo", "marks" : 99 }
{ "_id" : ObjectId("5c23aa5511bebd0c676e00de"), "Object" : "Table", "price" : 12
0, "location" : "Sydney" }
db.students.remove({"price": 120})
WriteResult({ "nRemoved" : 1 })
db.students.find()
{ "_id" : ObjectId("5c23a9ea11bebd0c676e00dd"), "name" : "Mo", "marks" : 99 }
db.students.remove({})
WriteResult({ "nRemoved" : 1 })
show collections
students
system.indexes
2018-12-27T03:23:16.299+1100 E QUERY [js] ReferenceError: system is not defin
ed :
@(shell):1:1