Skip to content

Commit c797b23

Browse files
committed
improve highlights
1 parent ee5131f commit c797b23

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

_posts/2015-1-1-MongoDB-Notes.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ sudo apt-get install -y mongodb-org
1818
{% endhighlight %}
1919

2020
Try MongoDB: http://try.mongodb.org
21-
```
22-
停止服务:
21+
{% highlight bash %}
22+
#停止服务:
2323
sudo service mongod stop
24-
启动服务:
24+
#启动服务:
2525
sudo service mongod start
26-
切换数据库
26+
#切换数据库
2727
use 数据库名
28-
```
28+
{% endhighlight %}
2929

3030
2. 插入命令
3131

3232
插入数据到students collection
33-
```
33+
{% highlight javascript %}
3434
db.students.insert({name: "张三", school: {name: "清华大学", city: "北京"}, age: 19, gpa: 3.97})
3535

3636
db.students.insert({name: "李四", school: {name: "北京大学", city: "北京"}, age: 20, gpa: 3.3})
@@ -43,7 +43,7 @@ db.students.insert({name: "小马", school: {name: "交通大学", city: "西安
4343

4444
db.students.insert({name: "小朱"})
4545

46-
```
46+
{% endhighlight %}
4747

4848
3. 查询命令
4949
```

0 commit comments

Comments
 (0)