Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ async function main() {
}
}
```

---

## Collection Operations
Expand Down Expand Up @@ -276,6 +275,24 @@ const cursor = collection.aggregate()

## Advanced Features

### Storage Statics

```javascript
// Get storage statistics for the database
const dbStats = client.dbStats()
```
| field returned | description |
|----------------|-----------------------------------------------|
| collections | the number of collections |
| objects | the number of objects/documents |
| views | the number of views (not currently supported) |
| indexes | the number of indexes |
| dataSize | the actual amount of storage used in bytes |
| storageSize | space allocated for storage in bytes |
| indexSize | space allocated for indexes in bytes |
| ok | whether the request was successful |
| lastUpdated | when the statistics where last updated |

### Indexing

```javascript
Expand Down