Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
nodejs-60-2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
winai buttasart
nodejs-60-2
Commits
0f4a013d
Commit
0f4a013d
authored
Feb 14, 2018
by
winai buttasart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add electron desktop application
parent
c34a83ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
note in class.txt
week05/note in class.txt
+45
-0
No files found.
week05/note in class.txt
0 → 100644
View file @
0f4a013d
//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:"ป้อมป้อม"}})
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment