Skip to content
This repository has been archived by the owner on Oct 15, 2018. It is now read-only.

Added .count() to documentation #135

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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
13 changes: 13 additions & 0 deletions queries/query-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,3 +301,16 @@ Movie.find()
results[0].revenue;
});
```
### .count()

`count` will find number of entries in a table.

| Description | Accepted Data Types | Required ? |
|--------------------|---------------------------------|------------|
| Empty | Empty | No |
| Callback | `function` | Yes |

Movie.count()
.exec(function(err, count) {
console.log(count);
});