@dolittle/sdk.projections
Version:
Dolittle is a decentralized, distributed, event-driven microservice platform built to harness the power of events.
23 lines • 1.14 kB
TypeScript
import { CollectionNameLike } from '../../Copies/MongoDB/CollectionName';
import { Conversion } from '../../Copies/MongoDB/Conversion';
import { ReadModelField } from './../ReadModelField';
/**
* Defines a builder for configuring read model copies to a MongoDB collection.
* @template T The type of the projection read model.
*/
export declare abstract class ICopyToMongoDBBuilder<T> {
/**
* Configures the collection name to store the read model copies in.
* @param {CollectionNameLike} collectionName - The collection name.
* @returns {ICopyToMongoDBBuilder<T>} - The builder for continuation.
*/
abstract toCollection(collectionName: CollectionNameLike): ICopyToMongoDBBuilder<T>;
/**
* Configures a conversion for a field on the readmodel.
* @param {ReadModelField<T>} field - The field to convert.
* @param {Conversion} to - The conversion to apply.
* @returns {ICopyToMongoDBBuilder<T>} - The builder for continuation.
*/
abstract withConversion(field: ReadModelField<T>, to: Conversion): ICopyToMongoDBBuilder<T>;
}
//# sourceMappingURL=ICopyToMongoDBBuilder.d.ts.map