Skip to content

Commit 2142a75

Browse files
committed
you're doing great
1 parent 9447e94 commit 2142a75

File tree

5 files changed

+1001
-17
lines changed

5 files changed

+1001
-17
lines changed

046_mongodb/05_query/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# query
1+
# find (aka, query)
22

33
### setup
44

046_mongodb/06_update/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ db.customers.update({},{$set:{role:"citizen"}}, {multi:true})
5454

5555
### save
5656
```
57-
db.customers.save({"role":"villain","name":"Goldfinger","age":77})
57+
db.customers.save({"role":"villain","name":"Jaws","age":43})
5858
```
5959

6060
```

046_mongodb/10_sort/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# limit
1+
# sort
22

33
Run **setup** below first
44

046_mongodb/11_index/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@
44
db.<collection name>.createIndex({<field to index>:<1 for ascend, -1 descend>})
55
```
66

7+
create index
78
```
89
db.oscars.createIndex({title:1})
9-
db.oscars.createIndex({releaseYear:1, releaseDay:1})
10+
```
11+
12+
see indexes
13+
```
14+
db.oscars.getIndexes()
1015
```
1116

1217
[learn to create a unique index and more](https://docs.mongodb.com/manual/reference/method/db.collection.createIndex/#db.collection.createIndex)

0 commit comments

Comments
 (0)