pip-services4-persistence-node
Version:
Persistence Components for Pip.Services in Node.js / ES2017
18 lines (16 loc) • 646 B
text/typescript
/** @module core */
import { IContext } from 'pip-services4-components-node';
import { IIdentifiable } from 'pip-services4-data-node';
/**
* Interface for data processing components that can get data items.
*/
export interface IGetter<T extends IIdentifiable<K>, K> {
/**
* Gets a data items by its unique id.
*
* @param context (optional) transaction id to trace execution through call chain.
* @param id an id of item to be retrieved.
* @returns a found data item or <code>null</code> otherswise.
*/
getOneById(context: IContext, id: K): Promise<T>;
}