-
Notifications
You must be signed in to change notification settings - Fork 1
count
AGenson edited this page Mar 4, 2018
·
4 revisions
Count the entities found corresponding to the given query
Property | Type | Default | Description |
---|---|---|---|
ctx |
Object |
required | Will serve to call a service action: ctx.call
|
query |
Object |
required | Clause WHERE --> ex: { username: "username", age: { $lt: 5 } }
|
Type: Promise
If entities were found :
// res = number of entity found
Promise.resolve({
name: "Operation Successful",
message: `Search Complete: ${res} element found`,
data: res
});
Else (nothing found / an error occured) :
Promise.reject({ ... });
cf - details about errors
- Home
- Features
- Install
- Usage
-
Database Functions
- Constructor
- Operations
- Database Errors
- Account Management