new DBObjectCreateTemplate(name:, data: [, uri] [, options])
Parameters:
| Name | Type | Argument | Description | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
name: |
String | valid DBObject name |
|||||||||||||||||||||||||||||||
data: |
Object | data set |
|||||||||||||||||||||||||||||||
uri |
Object |
<optional> |
{route, method} object if not POST @ '/api/ |
||||||||||||||||||||||||||||||
options |
Object |
<optional> |
Properties
|
- Source:
Extends
Methods
-
$compare()
-
Compare 'createdValue' with 'inputValue' handling special cases
Returns:
- Type
- boolean
-
$createObject()
-
Create the object dealing with duplicate as per _option.exists
Returns:
wrapping the created object
- Type
- Promise
-
execute()
-
Create a new DBObject from class 'this._name' by calling the associated route
- Overrides:
- Source:
Returns:
promise wrapping the created DBObject
- Type
- Promise