Commit 0f4a013d authored by winai buttasart's avatar winai buttasart

add electron desktop application

parent c34a83ea
//See manual of mongod
man mongod
//Set path
mkdir -p ~/mongodbdir
mongod --dbpath ~/mongodbdir
//Switch to myappdb collection
use myappdb
//Insert data to collection ("")
db.students.insert({name:"ป้อม",age:20})
db.students.insert({name:"Yos",age:21,gpa:3.5})
//Find all data in collections
db.students.find()
db.students.find().pretty() --> in beautiful format
JSON หรือ Java Script Object Notation
pkill mongod --> To kill mongod process
db.students.find({name:"Yos"}).pretty()
//Search data ที่มีตัว Y
db.students.find({name:/Y/}).pretty()
//Delete data name "Yeti"
db.students.remove({name:"Yeti"})
//Update data
db.students.update({name:"ป้อม"},{$set:{age:23}})
//Multi update datadb.students.update({name:"ป้อม"},{$set:{age:23,name:"ป้อมป้อม"}})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment