-
Notifications
You must be signed in to change notification settings - Fork 1
insertMany
AGenson edited this page Mar 4, 2018
·
2 revisions
Insert several entities into the table of the database
Property | Type | Default | Description |
---|---|---|---|
ctx |
Object |
required | Will serve to call a service action: ctx.call
|
entities |
Array.<Object> |
required | Entities to insert --> ex: [{ username: "user", age: 5 }, ...] |
Type: Promise
If the entities were inserted successfully :
// res = list of ids from entities inserted
Promise.resolve({
name: "Operation Successful",
message: `Inserts Done: ${res.length} element(s) inserted in table`,
data: res
});
Else (an error occured) :
Promise.reject({ ... });
cf - details about errors
- Home
- Features
- Install
- Usage
-
Database Functions
- Constructor
- Operations
- Database Errors
- Account Management