new upsert(table, fields) → {Operation}
Insert or Update a record if matched
Parameters:
Name | Type | Description |
---|---|---|
table |
string | The target table |
fields |
object | A fields object |
- Source:
Returns:
- Type
- Operation
Example
execute(
upsert('table', fields(
field('name', dataValue('name'))
))
)(state)