rxdb
Version:
A local-first realtime NoSQL Database for JavaScript applications - https://rxdb.info/
29 lines (23 loc) • 651 B
text/typescript
import type {
MaybePromise,
RxCollection,
RxDocument
} from '../../types';
export type RxPipelineHandler<RxDocType> = (
docs: RxDocument<RxDocType>[]
) => MaybePromise<any>;
export type RxPipelineOptions<RxDocType> = {
/**
* The identifier of the pipeline. Used when
* metadata of the pipeline is stored. Changing the identifier.
*/
identifier: string;
destination: RxCollection<any>;
handler: RxPipelineHandler<RxDocType>;
waitForLeadership?: boolean;
batchSize?: number;
}
export type CheckpointDocData<CheckpointType = any> = {
checkpoint: CheckpointType;
lastDocTime: number;
};