Interface for data processing components that can create, update and delete data items.
Description
The IWriter interface is used by data processng components that can create, update and delete data items.
Instance methods
create
Creates a data item.
create(context: IContext, item: T): Promise<T>
- context: IContext - (optional) a context to trace execution through a call chain.
- item: T - item to be created.
- returns: T - created item
update
Updates a data item.
update(context: IContext, item: T): Promise<T>
- context: IContext - (optional) a context to trace execution through a call chain.
- item: T - item to be updated.
- returns: Promise<T> - updated item
deleteById
Updates a data item.
deleteById(context: IContext, id: K): Promise<T>
- context: IContext - (optional) a context to trace execution through a call chain.
- id: K - id of the item to be deleted
- returns: Promise<T> - deleted item.